Browse AI Agents & MCP SECTION 3: Tool Definitions & Schemas

The Schema Writer

3 fill-in slots · from The AI Prompt Handbook for AI Agents & MCP

Your details

0/3 filled

The Schema Writer

Write the tool definition for this capability.

Capability: [DESCRIBE WHAT IT DOES]
Underlying API or function: [DESCRIBE THE SIGNATURE]
When the agent should use it: [DESCRIBE]
When it should not: [DESCRIBE]

Produce:
1. Tool name — verb_noun, unambiguous
2. Description — the critical field. It must state the trigger
   condition, not just the function. A model chooses from this
   text alone.
3. input_schema as JSON Schema:
   - Every property has a description
   - enum for every fixed value set
   - Only genuinely required fields in "required"
   - Formats and units named explicitly
   - additionalProperties: false
4. What it returns, described in terms of what the agent does next
5. Every error condition, with the exact message text to return

Rules for the description field:
- Lead with the trigger: "Call this when..."
- Add a negative where a confusable alternative exists: "Do not use
  this for X — use Y instead"
- Name conventions the model cannot infer (date formats,
  identifier shapes, units, timezone assumptions)
- Do not describe implementation

Rules for error messages:
- Written for the model to act on, not for a human to read in a log
- Say what went wrong AND what to do instead
- Include the format or constraint that was violated
- Point at the tool that would resolve the problem, by name

Highlighted [slots] are still empty. Downloads are plain .txt — paste into any AI assistant.