claude-flow
claude-flow copied to clipboard
feat: add MCP tool annotations to 90 tools for improved AI assistant understanding
Summary
- Added comprehensive MCP tool annotations to all 90 tools in the MCP server
- Improves AI assistant understanding of tool behavior and safety characteristics
Annotations Added
Each tool now includes an annotations object with four key hints:
| Hint | Purpose | Example Tools |
|---|---|---|
readOnlyHint: true |
Tool only reads data, no modifications | swarm_status, agent_list, health_check |
readOnlyHint: false |
Tool creates, modifies, or deletes data | swarm_init, agent_spawn, workflow_create |
destructiveHint: true |
Tool can destroy/delete resources | swarm_destroy, terminal_execute |
openWorldHint: true |
Tool accesses external APIs/systems | All GitHub tools, memory_sync, terminal_execute |
idempotentHint: true |
Repeated calls have no additional effect | model_load, backup_create, status checks |
Tool Categories Annotated
| Category | Tools | Key Characteristics |
|---|---|---|
| Swarm Coordination | 12 | swarm_destroy is destructive |
| Neural Network | 15 | Mostly computational, internal |
| Memory & Persistence | 12 | memory_sync has openWorld |
| Analysis & Monitoring | 13 | All read-only |
| GitHub Integration | 8 | All have openWorld=true |
| DAA Tools | 8 | Internal coordination |
| Workflow Tools | 11 | workflow_export is read-only |
| System & Utilities | 8 | terminal_execute is destructive+openWorld |
| SDK Integration | 3 | Query management |
Benefits
- Helps AI assistants make safer tool choices
- Enables permission systems to restrict destructive operations
- Improves tool selection for read-only vs write operations
- Flags external API access for security awareness
Test plan
- [x] Verified JavaScript syntax with
node --check - [x] Counted 90 annotation blocks added
- [ ] Maintainer review of annotation accuracy
🤖 Generated with Claude Code