technicals

What is tool calling?

June 1, 2026 · 4 min read

TOOL CALLING The model asks. Your software acts. AI model can only ask "refund #4471?" a request YOUR SOFTWARE your control · the gate run it a real action refund issued Dashed = the model merely asking · solid = your system doing it.

Definition

Tool calling lets an AI model pause, ask your software to run a specific function with specific inputs, and use the result to finish the job.

At a glance

How it works

The model stops mid-answer and says, in effect, “run get_order_status for #4471.” It never runs that itself; it produces a structured request, and your software decides whether to execute it.[3] The result goes back to the model, which continues. A “tool” is just a labeled capability you build and expose.[5]

Where it goes wrong

The model can pick the wrong tool, invent a plausible-but-fake input, or skip asking for missing details. Nothing executes on its own, your code does, so add guardrails: confirm risky actions, limit which tools exist, and log every call.

Bottom line

The model brings the judgment about what to call; you hold the power to run it and the guardrails around it.

Connects to Computer ScienceEconomics

References

  1. Tool use with Claude — Claude API Docs. Anthropic platform.claude.com
  2. Function calling | OpenAI API. OpenAI developers.openai.com
  3. What is LLM tool calling, and how does it work? Portkey portkey.ai
  4. Tool Calling Explained: The Core of AI Agents (2026 Guide). Composio composio.dev
  5. Function calling using LLMs — Martin Fowler. martinfowler.com www.martinfowler.com