What is a tool?
A tool is a schema-described function the model can call by name, turning text output into real action.
Guide details
- Type
- Explainer
- Reading time
- 2 min read
- Scope
- Fifth rung of the agent fundamentals ladder: from text output to real action.
A tool is a function the model can ask your code to run. Tools are how text output becomes real action: querying a database, calling an API, reading a file, or sending a message.
Registering a tool is declarative work. You provide a name, a description, and a JSON Schema for the parameters, and pass this definition along with the prompt. The model never executes anything itself. When a reply would benefit from outside data or an effect, it returns a structured request: a tool name plus arguments it composed from the conversation. Your code validates those arguments against the schema, runs the actual function, and sends the result back into the message list. The model then continues with the fresh data in context. Both major APIs formalize this handshake: OpenAI documents it as function calling, Anthropic as tool use.
Well-designed tools share the properties of good APIs: small surfaces, precise descriptions, and typed arguments, because the model chooses between them based mostly on the descriptions you wrote. Tools also set the trust boundary. The schema decides what the model may request, and your code decides what actually runs.
Sources
- Function calling — OpenAIdocumentationOpenAI
- Tool use overview — AnthropicdocumentationAnthropic
Taxonomy
Concepts
Topics
Related content
- Used byWhat is an AI agent?Agents act through tools; tools are the hands of the agent loop.
Referenced by
- RelatedWhat is an agent harness?Tool dispatch and result injection are core harness responsibilities.
- Requires
Related
- What is an AI agent?Mellnx first-partyagent-fundamentals
An AI agent is an LLM plus a harness plus tools running in a loop, with the model deciding each next step.
- What is an agent harness?Mellnx first-partyagent-fundamentals
An agent harness is the runtime around a model that assembles context, dispatches tools, and drives the working loop.
- What is an LLM?Mellnx first-partyagent-fundamentals
An LLM is a neural network trained to predict the next token, and that single mechanism is the engine every chat app and agent runs on.