Tools are functions the agent can call to interact with external systems — search the web, run code, read files, call APIs, send messages. Without tools, a language model can only generate text. With tools, it can act.
Define tools — Provide the model with each tool's name, description, and parameter schema (as JSON Schema).
Model selects and calls — When the model determines a tool is needed, it outputs a structured tool call: the tool name and parameter values.
Framework executes — The agent framework runs the function, captures the return value, and feeds it back as a tool result.
Model continues — The model reasons with the result in context and decides the next action.
Search — Web search, database queries, vector search over a knowledge base.
Fetch — Read URLs, files, or API responses.
Computation — Code execution, calculators, data analysis.
Effects — Send emails, create tickets, write files, call APIs. Highest risk — require careful access control.
Vague names, missing descriptions, and unclear parameters cause the model to call the wrong tool or call it incorrectly. Every tool needs: a clear name, a precise description of what it does and returns, well-named parameters with descriptions, and a schema that makes incorrect usage impossible.
Tools that cause irreversible effects — deleting data, sending communications, financial transactions — must require confirmation, be limited to minimum necessary permissions, be fully logged, and have rate limits and cost caps to prevent runaway agents.
Ask the AI assistant about tool use, how to define good tool schemas, or safety practices for action tools.