Skip to main content
ModelTerms

Agents & Tools · beginner

Tool Use (tool calling)

Tool use is when an LLM can call external functions — APIs, code interpreters, databases, web fetchers — and read their results. The mechanism that turns chat into action.

Explanation

The provider exposes a structured way for the model to emit "call this function with these arguments" in its output. Your runtime catches that, runs the call, and returns the result to the model in the next turn. The model can then use the result to decide its next step.

Tool use is the API substrate beneath every agent. Quality of tool use depends on three things: clear tool descriptions in the prompt, careful schema design, and the model's training on tool-augmented data.

Examples

  • Calling get_weather(city) and getting back JSON the model interprets.
  • A model calling run_python(code) to do precise arithmetic.

Frequently asked

What is Tool Use?

Tool use is when an LLM can call external functions — APIs, code interpreters, databases, web fetchers — and read their results. The mechanism that turns chat into action.

What is an example of tool use?

Calling get_weather(city) and getting back JSON the model interprets.

How is Tool Use related to Function Calling?

Tool Use and Function Calling are both agents & tools concepts. Function calling is the specific API mechanism by which an LLM emits a structured request to invoke a named function with typed arguments. The OpenAI-popularized way to do tool use.

Is Tool Use considered beginner?

Tool Use is generally considered beginner-level material in the AI and LLM space.

Function CallingAgents & Tools

Function calling is the specific API mechanism by which an LLM emits a structured request to invoke a named function with typed arguments. The OpenAI-popularized way to do tool use.

AgentAgents & Tools

An AI agent is an LLM-driven system that decides which actions to take, executes them via tools, observes the results, and iterates until a goal is met.

Model Context ProtocolAgents & Tools

MCP is an open standard for connecting LLMs to external tools and data sources. It defines a JSON-RPC protocol so any client (Claude Desktop, Cursor, IDE plugins) can talk to any MCP server.

ReActAgents & Tools

ReAct is a prompting pattern that interleaves reasoning ("Thought:") with actions ("Action:") and observations ("Observation:"). It is the foundation of most tool-using agents.

Side-by-side comparisons

Sources