tool use
Letting a model ask your code to run named functions with arguments, so it can fetch data or take actions it cannot do in text.
In more detail
You describe each tool with a name, a description and a JSON Schema for its input. The model replies with a tool call instead of text; your code checks and runs it and sends back the result, and the model continues. The model only ever asks: your code decides what actually runs.
Related terms
- tool call — A model's structured request to run one tool with given arguments, returned instead of, or alongside, text.
- tool result — The message your code sends back after running a tool call, matched to it by id, which the model reads before continuing.
- tool definition — The name, description and JSON Schema for its input that tell a model what a tool does and how to call it.
- AI agent — A system in which a model decides its own next steps, calling tools in a loop until a task is done, rather than following a path your code fixed.
Taught in
- What An AI Engineer Does — AI Engineering: LLM Apps, RAG & Agents
- Tokens And The Context Window — AI Engineering: LLM Apps, RAG & Agents
- Choosing A Model — AI Engineering: LLM Apps, RAG & Agents
- The Request And The Response — AI Engineering: LLM Apps, RAG & Agents
- Streaming Responses — AI Engineering: LLM Apps, RAG & Agents
- Cost, Latency And Caching — AI Engineering: LLM Apps, RAG & Agents
- Anatomy Of A Prompt — AI Engineering: LLM Apps, RAG & Agents
- Reasoning Techniques — AI Engineering: LLM Apps, RAG & Agents
- Prompts As Code — AI Engineering: LLM Apps, RAG & Agents
- From Prompts To Context — AI Engineering: LLM Apps, RAG & Agents
- When Context Fails — AI Engineering: LLM Apps, RAG & Agents
- How RAG Works And When To Use It — AI Engineering: LLM Apps, RAG & Agents
- Grounded Answers With Citations — AI Engineering: LLM Apps, RAG & Agents
- Function Calling — AI Engineering: LLM Apps, RAG & Agents
- Designing Tools A Model Can Use — AI Engineering: LLM Apps, RAG & Agents
- The Agent Loop — AI Engineering: LLM Apps, RAG & Agents
- Workflows Before Agents — AI Engineering: LLM Apps, RAG & Agents
- Planning, Memory And Many Agents — AI Engineering: LLM Apps, RAG & Agents
- Agent SDKs And Human Approval — AI Engineering: LLM Apps, RAG & Agents
- What MCP Is — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents
- Remote Servers And Trust — AI Engineering: LLM Apps, RAG & Agents
- Threat-Model An LLM App — AI Engineering: LLM Apps, RAG & Agents
- Prompt Injection — AI Engineering: LLM Apps, RAG & Agents
- Excessive Agency — AI Engineering: LLM Apps, RAG & Agents
- Model-Graded Evals — AI Engineering: LLM Apps, RAG & Agents
- Evaluating RAG And Agents — AI Engineering: LLM Apps, RAG & Agents
- Images, Audio And Speech — AI Engineering: LLM Apps, RAG & Agents
- Working With AI Coding Assistants — AI Engineering: LLM Apps, RAG & Agents
- Capstone: The Tasks Assistant — AI Engineering: LLM Apps, RAG & Agents