MCP Tool Behavior Declarator
Adds behavior annotations to MCP tool definitions per the 2025-06-18 spec. Clients use these to adjust UI presentation and safety gating.
/mcp-tool-attrMCP Server Author? Run /mcp-tool-attr to annotate all tools for safer client behavior
Security Engineer? Ensure destructive tools are properly flagged for UI gating
How It Works
Skill Code
Copy and paste into your CLAUDE.md to start using immediately.
How MCP Tool Behavior Declarator Works
MCP Tool Behavior Declarator scans all tools in your server directory, auto-classifies each as readOnly, destructive, idempotent, or openWorld, and adds annotations objects. Clients use these attributes to determine UI behavior — showing confirmation dialogs for destructive tools, auto-approving read-only ones, and optimizing retries for idempotent tools.
When to Use MCP Tool Behavior Declarator
Essential when your MCP server has multiple tools with varying safety levels. Explicitly declaring behavior attributes enables clients to apply appropriate UI gating and retry strategies.
Key Strengths
- Auto-classification across four behavior attributes
- Destructive tools automatically gated with confirmation dialogs
- Read-only tools can run without user approval
- Idempotent marking enables safe network error retries