liveBook · Manning

Tool

As explained in Build Python Web Apps with Streamlit

A tool is a callable software interface that an application or language model can invoke with structured parameters to perform an operation or retrieve information.

A tool is a callable function or API that an application or language model can invoke with structured parameters to perform a real-world action or retrieve information. In an agent, the model can answer directly or request a tool call; the application executes the tool and returns its result for further processing. section 10.1.3 section 10.6.3

Useful tools have clear inputs, outputs, and documentation:

  • Define a focused function, using type hints and docstrings to describe parameters, formats, and return values. section 10.6.3

Checking an order

A support agent can retrieve a user's ID from an email address and birth date, find an order ID from the user ID and order date, then retrieve the order status. For Alice Johnson, the sequence returns order 101, its shipped status, tracking number TRK123456789, and expected delivery date February 18, 2025. section 10.6.4

How Build Python Web Apps with Streamlit covers it

How deep it goes
Defines interfaces, examples, registration, and graph routing, while leaving function implementation details outside the focus.
Examples
Demonstrates user lookup, order lookup, status retrieval, and cancellation using static customer and order data.
What it assumes
Assumes basic functions and APIs, while teaching tool interfaces through type hints, docstrings, and concrete order-support workflows.
What you can do after
Build it from scratch as documented functions, register it with an agent, and route model requests through tool execution.
How it connects
Connects tools with agents, function calling, APIs, type hints, docstrings, LangGraph, and conditional graph edges.

Also explained in

Compare how 14 books explain tool →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build Python Web Apps with Streamlit. The section links point to the parts of the book it draws on.