Design a Tool Description for an AI Agent
Write a clear tool or function definition an AI agent can actually call correctly — unambiguous parameters, a strict schema, and documented failure modes.
0 likes
0 dislikes
Sign in to rate this prompt
Prompt
Help me write a tool (function) definition that an AI agent can call reliably.
What the tool does:
{{purpose}}
The inputs it needs, and what they mean:
{{inputs}}
What it returns, or does:
{{outputs}}
Produce:
1. A **tool name** that's specific and unambiguous (namespaced if it belongs with related tools).
2. A **description written for the model**: what the tool is for, when to use it and when NOT to, and any context the model can't infer (special formats, units, definitions of niche terms).
3. A **parameter schema** — for each parameter: a clear name (prefer `user_id` over `user`), its type, whether it's required, allowed values, and a one-line description. Use a strict schema.
4. **Failure modes** — the errors it can return, each with an actionable message, so the agent can recover rather than retry blindly.
If a parameter's meaning or the return shape is unclear from what I gave you, ask instead of guessing.
Why this prompt works
-
How to Deploy an AI Agent
Every deployment problem follows from one property: you don't know how long a run takes, because you didn't write the path. Why the run m...
Read the guide → -
How to Trace and Debug an AI Agent
Print statements don't survive a system whose control flow is decided at runtime by a model. What every span must carry, the OpenTelemetr...
Read the guide → -
What Changed in MCP 2026-07-28
The handshake is gone, sampling and roots are deprecated, and HTTP+SSE is no longer a transport. A test for whether the MCP guide you're ...
Read the guide →