Tool use
Tool use is the capability of an AI system or agent to request external software operations through defined interfaces to obtain information or perform actions.
Build an AI Agent (From Scratch)
A tool call is a model-generated specification requesting invocation of a particular external tool with particular arguments.
- How it is used
- Enables agents to obtain external information and take actions through model-selected tools in an iterative loop.
- How deep it goes
- Works through tool schemas, call execution, result feedback, and reliability guidelines, then extends an existing function into an MCP server.
- Examples
- Traces a calculator call and result, contrasts tool schemas, and wraps a web-search function as an MCP tool.
- What you can do after
- Build it from scratch by defining functions and schemas, dispatching model-generated calls, and feeding results back into context.
Read how Build an AI Agent (From Scratch) explains tool use →
Build a Multi-Agent System (from Scratch)
ToolCall is a data structure representing a requested tool invocation and its arguments.
- How it is used
- Turns LLM-generated action requests into tool executions and returns results for synthesis within an agent processing loop.
- How deep it goes
- Implements request and result models, tool interfaces, chat continuation, and concurrent execution, with one tool-calling phase per task step.
- Examples
- Demonstrates a bakery web search and a Hailstone calculation that returns 10 for input 3.
- What you can do after
- Builds tool-call infrastructure from scratch and performs a complete invocation with OllamaLLM.
Read how Build a Multi-Agent System (from Scratch) explains tool use →
Designing AI Systems
tool_calls is a message field containing an assistant's requested tool or function invocations.
- How it is used
- Connects assistants to external systems through model-requested functions executed by a platform workflow.
- How deep it goes
- Explains tool schemas, message linkage, registration, execution, and iterative orchestration with production controls.
- Examples
- Uses appointment availability checks, calendar event creation, ticket creation, and web search to illustrate tool requests and actions.
- What you can do after
- Apply it via the platform SDK to register and discover tools, execute model requests, and return results in an agent loop.
AI Agents and Applications
A tool call is a structured model response that requests invocation of a named tool with supplied arguments.
- How it is used
- Enables agents to select and sequence external capabilities dynamically for travel information and weather requests.
- How deep it goes
- Works through registration, message routing, execution, and debugging before contrasting a built-in ReAct agent with a manual graph.
- Examples
- Traces multiple Cornwall search queries and a search-then-weather workflow.
- What you can do after
- Build a tool-calling loop from scratch and apply tool registration through LangChain and LangGraph.
Introduction to Generative AI, Second Edition
Tool use is an AI system capability in which the system invokes external software, services, or functions to perform actions or obtain information.
- How it is used
- Enables AI agents to obtain information and act through external tools, including in multistep tasks.
- How deep it goes
- Explains structured calls, result handling, training approaches, and repeated invocation at an overview level.
- Examples
- Illustrates web search for current news and a restaurant sales spreadsheet followed by a review-rating search.
- What you can do after
- Evaluate tool-enabled agents by considering task success, search failures, unsafe actions, and adversarial testing.
Read how Introduction to Generative AI, Second Edition explains tool use →
AI for Everyday IT
Function calling is a language-model capability that enables a model to request invocation of defined software functions or external services by producing structured arguments.
- How it is used
- Connects natural-language requests to structured application functions and external actions.
- How deep it goes
- Walks through function definitions, responses, execution, and security controls without building a complete application.
- Examples
- Uses a database query assistant, a simulated currency converter, and an HR data-cleanup workflow.
- What you can do after
- Apply it via OpenAI’s API to structure function requests and integrate them with application code.
Reinforcement Learning from Human Feedback
Tool use is a model capability in which generated interactions invoke external tools or services to perform tasks.
- How it is used
- Extends language models with current information, precise computation, and external actions through structured tool requests.
- How deep it goes
- Explains the generation and execution loop, multistep reasoning, training stages, and formatting and masking decisions.
- Examples
- Uses a search for current information, file organization, and a code-executed Fibonacci calculation to illustrate tool capabilities.
- What you can do after
- Evaluate and understand how tool calls, external execution, and returned results combine in a model workflow.
Read how Reinforcement Learning from Human Feedback explains tool use →
Build AI-Enhanced Web Apps
Tool calling is a technique in which an AI model emits a structured request for an external tool or function, receives the execution result, and incorporates it into its response.
- How it is used
- Supplies external information or actions when a model needs real-time or specialized capabilities.
- How deep it goes
- Traces the request, execution, and result-return flow, and summarizes custom tool implementation without detailing code.
- Examples
- Uses a weather API lookup and shows how returned conditions can be inserted into a prompt.
- What you can do after
- Build custom tools by defining functions, registering them with the Vercel AI SDK, and handling their responses.
Build Python Web Apps with Streamlit
Tool use is the capability of an AI system to invoke external software functions or services while solving a task.
- How it is used
- Enables agents to complete user requests by interacting with external systems rather than only providing information.
- How deep it goes
- Traces chained calls and shows LangGraph tool-node wiring, without detailing the tools’ implementations.
- Examples
- Follows a customer’s order lookup through user identification, order retrieval, and status reporting.
- What you can do after
- Apply it via LangGraph to route an agent’s tool calls and continue its conversation.
Read how Build Python Web Apps with Streamlit explains tool use →
Building Reliable AI Systems
An AI capability in which a model invokes external tools to obtain information or perform actions.
- How it is used
- Enables agents to retrieve external information or perform actions during a conversation.
- How deep it goes
- Explains the function-calling loop and its implementation, alongside MCP routing, approval controls, and tool-call evaluation.
- Examples
- Uses a weather assistant, an MCP product search, and a customer-support refund workflow.
- What you can do after
- Apply tool use via OpenAI function calling to ground an interactive weather assistant in external API data.
Grokking AI Applications
call_tool is an MCP client operation that invokes a named tool with supplied arguments.
- How it is used
- Enables agents to perform external operations when reasoning alone cannot retrieve information or act on a system.
- How deep it goes
- Defines tools and their parameters, then demonstrates MCP discovery and invocation in Python without detailing protocol internals.
- Examples
- Uses weather lookup and calculator calls, including an MCP client invoking add(a, b).
- What you can do after
- Apply it via MCP client utilities to discover available tools and invoke an add(a, b) function.
Investing for Programmers
A tool use pattern is an agent architecture in which an agent delegates tasks to external tools, libraries, or APIs and integrates their results.
- How it is used
- Expands an agent’s functional range by delegating data retrieval, transformation, and computation to specialized systems.
- How deep it goes
- Defines the delegation pattern and outlines tool selection, call orchestration, and result integration without implementation details.
- Examples
- Uses a stock price API for real-time data and a sentiment analysis tool for market news.
- What you can do after
- Apply it by orchestrating specialized tools and integrating their outputs into an agent’s decisions.
Spring AI in Action
A tool call is a model-generated request for an application to invoke an external callable capability.
- How it is used
- Enables an LLM to obtain external data and perform application actions during conversational generation.
- How deep it goes
- Traces tool schemas, generated arguments, automatic invocation, tool-result messages, and final completion responses.
- Examples
- Demonstrates getCurrentTime answering a time-zone question through generated JSON arguments and a returned timestamp.
- What you can do after
- Operate tool interactions through Spring AI’s consistent provider abstraction and interpret the resulting conversation messages.
Authorization in Action
A tool invocation is a request by an agent or software system to execute an operation provided by an external tool.
- How it is used
- Enables agents to access documents, databases, APIs, and workflows while pursuing tasks.
- How deep it goes
- Defines invocation and structured integration, but defers the authorization decision governing whether a call is allowed.
- Examples
- Uses document search, database queries, calendar access, internal APIs, and automated workflows as tool examples.
- What you can do after
- Operate structured tool integrations by discovering capabilities and invoking them with defined inputs.
Claude at Work
Tool use is an AI technique in which a model invokes external capabilities such as web search or script execution.
- How it is used
- Extends prompt-driven conversation with searches or scripts that help produce an answer or requested work.
- How deep it goes
- Describes iterative tool-assisted responses and multi-call coding turns, but does not detail tool implementations.
- Examples
- Uses web searches, scripts, repository searches, file edits, builds, and tests as concrete tool actions.
- What you can do after
- Apply it via Claude Code to investigate an error, edit files, and run builds or tests in one turn.
AI Agents in Action, Second Edition
A tool call is a structured request from an AI system to invoke a tool and obtain its result.
- How it is used
- Uses tool calls to perform functions or gather information as part of LLM tasks.
- How deep it goes
- Demonstrates implementing and registering a tool, then verifying its call in a trace.
- Examples
- Uses a get_research_sources tool and a search workflow choosing between internal knowledge and the public web.
- What you can do after
- Apply it by registering get_research_sources with an agent and verifying one tool call before its response.
Read how AI Agents in Action, Second Edition explains tool use →
AI Agents in Action
Function calling is an LLM interface capability that produces a structured request to invoke a named function with extracted arguments.
- How it is used
- Connects LLM requests to named functions so agents can use tools to perform actions.
- How deep it goes
- Explains argument extraction and agent-side execution, including parallel calls, but defers ordered action sequences.
- Examples
- Uses a movie-recommendation request and weather and recommendation actions to demonstrate tool calls.
- What you can do after
- Apply it via an LLM API or agent implementation to identify requested functions and execute their arguments.
Context Engineering
Tool calling is a model capability for requesting that an external tool or operation be invoked.
- How it is used
- Enables agents to retrieve live information and perform operations against external systems.
- How deep it goes
- Explains the request-execution-response cycle, including context assembly, call identifiers, parallel calls, and context costs.
- Examples
- Uses a mock weather lookup and a bug investigation involving an issue function, shell command, and MCP documentation.
- What you can do after
- Apply function calling via the OpenAI API to execute a local function and return its result to the model.
Also covered in
- Essential GraphRAG
- Retrieval Augmented Generation, The Foundational IdeasIn early access (MEAP)
- Software Testing with Generative AI
- Rearchitecting LLMsIn early access (MEAP)
- Building Distributed Applications that Work
- Hugging Face in Action
- Designing AI AgentsIn early access (MEAP)
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- contractA contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
- AI agentAn AI agent is a computational system that uses artificial intelligence to interpret information and select or perform actions toward goals while interacting with an environment.
- JSONJSON is a language-independent text-based data-interchange format that represents structured values using objects, arrays, strings, numbers, booleans, and null.
Related concepts
- OpenAI APIuses · The OpenAI API is a programming interface that allows software applications to send requests to OpenAI models and services and receive responses.
- __call__() methodused by · __call__() is a Python special method that defines the behavior of an object when invoked with function-call syntax.
- subagentused by · A subagent is an agent assigned by another agent to perform a delegated part of a larger task under its coordination or authority.
- context writingused by · Context writing is the technique of saving useful context outside the active model context so it can be recovered later.
- control looppart of · A control loop is a repeated process that observes a system’s state, compares it with a desired state, and uses feedback to guide corrective action.
Questions about tool use
What is tool use?
Tool use is the capability of an AI system or agent to request external software operations through defined interfaces to obtain information or perform actions.
Which Manning books explain tool use?
Build an AI Agent (From Scratch), Build a Multi-Agent System (from Scratch), Designing AI Systems, AI Agents and Applications, Introduction to Generative AI, Second Edition, AI for Everyday IT, Reinforcement Learning from Human Feedback, Build AI-Enhanced Web Apps and 10 more.
What should I know before learning tool use?
Manning books that teach tool use usually introduce language model, contract, AI agent and JSON first.
What is tool use part of?
Tool use is part of control loop. A control loop is a repeated process that observes a system’s state, compares it with a desired state, and uses feedback to guide corrective action.
What is tool use also called?
Tool use is also called tool calling or function calling.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

















