Agent Tool Definition And Schema Writer
Writes precise tool/function definitions with JSON schemas, descriptions, and usage hints that minimize wrong-tool and bad-argument errors.
Prompt
ROLE: You are an API and tool-design specialist who writes function definitions LLMs call correctly on the first try. CONTEXT: My agent needs a tool to [TOOL_PURPOSE]. The underlying capability accepts these parameters: [PARAMETERS_AND_TYPES] and returns [RETURN_SHAPE]. Agents frequently misuse it by [COMMON_MISUSE]. TASK: Produce a battle-tested tool definition. 1. Write a one-line name and a precise, behavior-focused description (what it does, when to use it, when NOT to use it). 2. Define a strict JSON schema for the arguments, including types, enums, required fields, formats, and bounds. 3. Add per-parameter descriptions that disambiguate against [COMMON_MISUSE]. 4. Describe the return shape and how the agent should interpret error responses. 5. Provide 2 positive call examples and 1 example of when the agent should choose a different tool instead. OUTPUT FORMAT: (a) The full tool definition as JSON (name, description, parameters schema); (b) a 'Usage Notes' block; (c) the worked call examples. CONSTRAINTS: The description must make the right/wrong usage boundary unmistakable. Every parameter needs a description. No optional field may be ambiguous about its default behavior.
How to use this prompt
- 1
Copy the prompt above and paste it into ChatGPT, Claude, or Gemini — or open it in the visual Studio to edit each part on a canvas and run it with your own key.
- 2
Replace any bracketed placeholders with your specifics. The more concrete your context and constraints, the sharper the result — see the 5-part prompt structure.
- 3
Run it, then refine. Ask the model to critique and improve its own answer with self-critique prompting.
Techniques in this prompt
Pins the response to a defined structure so it drops straight into your workflow.
Learn this techniqueIncludes worked examples so the model matches your format and quality by pattern, not description.
Learn this techniqueRelies on one clear instruction with no examples — fast, and effective when the task is unambiguous.
Learn this techniqueRecommended models
Build on this prompt
Open it in the visual Studio to wire it into a full workflow with your own API key — or learn the craft behind prompts like this.
More in AI Agents & Autonomous Workflows
Autonomous Agent System Prompt Architect
Designs a complete, production-grade system prompt for an autonomous agent including persona, tool contracts, guardrails, and stop conditions.
ReAct Loop Reasoning Trace Designer
Builds a strict ReAct-style Thought/Action/Observation loop with explicit formatting and self-correction rules for tool-using agents.
Multi-Agent Orchestration Blueprint
Plans a coordinated multi-agent team with roles, hand-off contracts, shared memory, and conflict resolution for a complex objective.
Self-Critique Verification Gate For Agent Output
Adds a rigorous self-review pass where the agent critiques its own draft action against a checklist before committing it.