Tool calling
Letting a model call functions and APIs in your product.
Tool calling lets a model request actions such as searching, creating records or calling APIs. Tool design matters as much as prompt design: clear names, narrow scope and good errors. Every tool is also a permission to think about.
Why it matters for a product engineer
Tool calling lets a model ask your code to do things: search, create a record, call an API. The model only proposes the call; your code runs it. So every tool is both an interface to design and a permission to control. Product engineers design tools much as they design APIs, but for a reader who takes every name and description literally.
How to do it
- Build tools around tasks the user has, not around every endpoint.
- Give each tool a clear name, a description of when to use it, and typed parameters.
- Return only what the model needs, with errors that say how to recover.
- Check permissions in your code for every call, whatever the model says.
- Make write actions safe to repeat, and ask for approval where a mistake is costly.
- Test tools with real tasks, and read the transcripts to see where the model gets confused.
Common mistakes
- Dozens of overlapping tools, so the model picks the wrong one.
- Returning huge responses that fill the context.
- Errors like “400 bad request” with no hint of what to change.
- Trusting the model to respect permissions.
Example
Papermark and Zernio both let agents use their products through MCP, in different ways. Papermark built 57 typed tools with scoped tokens and an audit log. Zernio generates its MCP server from its API, so agents get every endpoint with no extra work. (Papermark, Zernio)
Two ways to give agents tools
| Papermark | Zernio | |
|---|---|---|
| Tools | 57 typed tools | 496, as listed on 15 Nov 2026 |
| Where they come from | One per endpoint of its developer platform | Generated with the API |
| Permissions | Scoped tokens, answers only from readable documents | Not covered in the episode |
| Record | An append-only audit log | Not covered in the episode |
A curated set is easier for a model to choose from and to audit. A generated set never falls behind the API.
Reportedpapermark.com/agents, Nov 2026; Zernio's site and its founder on the Itnig podcast
Sources: Writing effective tools for AI agents (Anthropic) ↗ · Tool use with Claude (Claude docs) ↗
Technical leverage
Enforce authorization, validate arguments and design idempotent operations outside the model’s reasoning loop.
Evidence of mastery
Put it into practice- Practice
- Expose a small read tool and a reversible write tool to an assistant.
- Artifact
- Tool contracts and tests for bad arguments, denied permissions and repeated calls.
What good looks like
- The server checks authorization for every operation.
- Tool errors give enough information to recover without exposing sensitive data.
Use this evidence to assess your work. Your map status is a self-assessment, not a certification.
Resources
2- docsStart here
Tool use with Claude ↗
Anthropic docs · 10 minHow a model calls functions you define, and how your code runs them and returns results.
- articleGo deeper
Writing effective tools for AI agents ↗
Anthropic · 2025 · 15 minHow to design tools an agent can use well, and how to evaluate and improve them.
Tools
2- ToolOpen source
- ToolOpen source
promptfoo
Open-source tool for testing prompts and models against test cases, and for red-teaming LLM apps.