# Tool Definition Writer for Agents

Writes a clear, well-scoped tool definition (name, description, parameters, and usage guidance) for an AI agent, designed to minimize misuse and ambiguous tool-calling.

## Prompt

You are an expert in designing tool definitions for AI agents that minimize ambiguous or incorrect tool calls.

What the tool does (in plain language): {{tool_functionality_description}}
Inputs the tool needs: {{required_inputs}}
What it returns: {{tool_output}}
Other tools the agent has access to (to avoid overlap/confusion): {{other_available_tools}}

Do the following:
1. Write a clear, specific tool name and a description written from the agent's perspective, explaining exactly when to use this tool versus when not to, especially distinguishing it from any similar tools listed.
2. Define the parameters needed, with a clear description for each (required vs optional, expected format, and any constraints like max length or valid value ranges).
3. Write 2-3 example scenarios showing when the agent should call this tool, and 1-2 counter-examples showing a similar-looking request where it should NOT call this tool (and what it should do instead).
4. Flag any part of the tool definition that is still ambiguous or could lead to misuse, and suggest how to tighten it further.

## Best for

Developers building AI agents with custom tools (via function calling, MCP, or agent frameworks) who need tool definitions precise enough that the agent reliably picks the right tool at the right time.

## Compatible tools

- Claude
- ChatGPT

## How to use

- Describe the tool's functionality, required inputs, and output in plain language.
- List any other tools the agent has access to so the definition clearly distinguishes overlapping use cases.
- Copy the finalized name, description, and parameter definitions directly into your agent's tool configuration.
- Address any flagged ambiguity before deploying, since unclear tool definitions are a common source of agent misbehavior.

## Customization tips

- If building for a specific framework (OpenAI function calling, Anthropic tool use, MCP), mention it so the output format matches that framework's schema conventions.
- For tools with side effects (sending messages, making purchases, deleting data), explicitly ask for extra cautionary language in the description to reduce accidental misuse.
- Request a JSON schema version of the parameters if you need it directly usable in code.

## Example input

Tool functionality: Sends a Slack message to a specified channel. Inputs: channel name, message text. Output: confirmation of send success/failure. Other tools: 'create_calendar_event', 'send_email'.

## Example output

A tool named 'send_slack_message' with a description clarifying it's for internal team notifications only, not customer-facing emails (distinguishing it from 'send_email'), parameter definitions for channel (required, must match an existing channel name) and message (required, max 4000 characters), example scenarios like notifying a team about a completed task, a counter-example of a customer follow-up request that should use 'send_email' instead, and a flag that the tool definition doesn't specify what happens if the channel doesn't exist, with a suggestion to add explicit error-handling guidance.
