Hashlogics
Glossary

What is tool calling?

Miss how this works and you write code that trusts the model to run the refund, when all it ever did was ask for one.

Tool calling

function callingtool use

Tool calling is the mechanism that lets a language model request an action in your systems: given a set of tools you defined, the model returns a structured block naming one tool and its arguments, and your application executes it and sends the result back. The model never runs the code.

You supply a name, a description and a JSON schema for each tool. The model reads those and picks one. What comes back is a request, not an action.

That gap is where your permission checks live. The model can ask to delete a record. Whether the record gets deleted is a decision your code makes, with your auth rules, on your server.

Two names, one thing

Function calling and tool calling are the same mechanism

There is no technical distinction to learn here. OpenAI's own guide opens with "Function calling (also known as tool calling)", so the vendor that popularised the older name treats both as one concept. Anthropic files the same capability under tool use.

The wire format does differ, and that is the part worth knowing. OpenAI returns an item of type function_call carrying a call_id, a name and JSON arguments, and you reply with a function_call_output. Anthropic returns stop_reason: "tool_use" plus a tool_use block, and you reply with a tool_result. Anything claiming a deeper difference between the two terms is selling you a distinction the vendors do not make.

One real exception. Anthropic also offers server tools, such as web search, which run on Anthropic's infrastructure rather than yours. For those the results arrive in the same response and you execute nothing.

One round tripLive
  1. DefineName, description, JSON schema.
  2. AskModel returns a tool_use block.
  3. CheckYour auth rules, not the model's.
  4. RunYour code calls the real API.
  5. Returntool_result goes back as context.

Skip the Check node and the model's permissions become your users' permissions. Nothing in the protocol adds it for you.

In practice

Tool descriptions are the real interface

Teams tune the prompt for days and leave the tool descriptions as one-liners. Wrong order. The description is what the model reads when it decides, so a vague one produces a confident call to the wrong tool.

Write each description as if for a new hire with no context: what it does, when to use it, and when not to. Then make the schema narrow. A required enum beats a free-text string, because a value the schema rejects never reaches your database. Anthropic also documents a strict mode that holds calls to your schema exactly.

Questions, answered
01Is tool calling different from function calling?

No, they name the same mechanism. OpenAI's documentation writes "Function calling (also known as tool calling)", and Anthropic calls it tool use. Only the field names on the wire differ.

02Does the model execute the tool itself?

No, for tools you define. The model returns a request and your application runs the code, which is what keeps auth and rate limits in your hands. Anthropic's server tools are the exception: those run on Anthropic's infrastructure and return results directly.

03How is MCP related to tool calling?

MCP is a standard way to expose tools so several clients can use the same server, while tool calling is what happens inside one model request. We run MCP in production for Go4Gr8, where it backs the commitment tracking in a leadership coaching platform.

04What happens when the model calls a tool with bad arguments?

Your code rejects it and returns an error as the tool result, and the model gets another turn to correct itself. Schema validation catches most of these before your business logic runs, which is the argument for tight schemas over permissive ones.

Verified
Start

Anyone can ship the agent. We answer the pager.

We build AI agents and automation, then stay on under an agreed service level. A senior engineer reads every brief, and your call gets scheduled within 24 hours.

What happens next

  1. 01

    You send a brief or book a call

    Two minutes, whichever you prefer.

  2. 02

    A senior engineer replies within 24 hours

    Not a sales rep.

  3. 03

    Honest scoping, in writing

    And if we’re not the right fit, we say so.

Abdul Basit, CEO of Hashlogics

“I started Hashlogics because too many teams ship a demo, get paid, and disappear. We build to a standard we’d run ourselves — and we stay to keep it running.”

Abdul Basit · CEO · a direct line

Not ready to talk? Take the checklist.

12 questions to ask any AI agency before you sign. They separate a demo shop from a team that ships to production.

Get the checklist

Free · no newsletter