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

Like this prompt?

Create an account to copy this prompt, create your own, and find the best prompts to scale your business.