Skip to content

Tools other agents can trust: cheatsheet

The agent seesThe agent never sees
Tool nameYour source code
DescriptionYour intentions
Input schemaYour internal docs

Spine of the lesson: to the model, the description is the tool.

PartStatesExample cue
PurposeThe job, one plain sentence”Return the stock count for one product”
InputsMeaning and format of each parameter”exact SKU, for example RACK-CT-114”
OutputShape of the result, incl. empty case”count, shelf location, last delivery”
BoundariesWhat it will not do”read-only, never changes stock”
SiblingsWhen to use it vs named neighbors”for keywords, use inventory_search_catalog

Imagined reader: a new hire who can ask no follow-up questions.

SmellFix
One tool, action parameter, many modesSplit along jobs, one strict contract each
Agent always chains the same 3 callsMerge them into one job-shaped tool
One tool per backend endpointThe unit is the agent’s job, not your API’s history
RuleWhy
Shared prefix per server (inventory_)Clusters tools; no cross-server confusion
Sibling names non-interchangeableNames narrow selection before descriptions
Cover test: names alone, colleague picks rightIf they hesitate, rename
CaseRetry helps?The error must say
Transient (timeout, upstream down)Yes, likelyRetry shortly; what is unaffected
Business-rule refusalNeverWhich rule; what would work instead
Permission problemNeverNeeds different caller or human sign-off
Empty resultNot an errorQuery succeeded; zero matches is the answer

Never confuse: “the query failed” with “the query succeeded and found nothing.”

PrincipleEffect
Only the tools the role needsBetter selection, smaller blast radius
Too many or overlapping toolsDegraded strategies, harder choices
Tool never grantedA guarantee (instruction is only a request)
PrimitiveIsUse for
ToolFunction the model calls (user approval)Acting on the world
ResourceFile-like data clients readRead-only material, e.g. a price list
PromptPre-written templateRecurring user tasks

Python SDK: decorated typed function; the docstring becomes the tool definition the model reads.

ScopeWho gets itWhere it livesIn version control
Local (default)You, this projectHome configNo
ProjectWhole team.mcp.json in project rootYes, by design
UserYou, all projectsHome configNo

Secrets: committed config references variables, plain (${VAR}) or with a default (${VAR:-default}), in command, args, env, url, and headers. Missing variable with no default fails the load loudly. Project-scoped servers need per-person approval before first use.

LineMeaning
The description is the toolSelection runs on your prose, not your code
An error is part of the interfaceThe agent’s next move is decided by your error text
Found nothing is not failedEmpty results are true answers about the world
A tool never granted is a guaranteeLeast privilege beats instructions