Skip to content

feat: Add MCP tool annotations for all 6 tools#107

Open
bryankthompson wants to merge 1 commit intoisaacphi:mainfrom
bryankthompson:feat/add-tool-annotations
Open

feat: Add MCP tool annotations for all 6 tools#107
bryankthompson wants to merge 1 commit intoisaacphi:mainfrom
bryankthompson:feat/add-tool-annotations

Conversation

@bryankthompson
Copy link

Summary

Add MCP tool annotations to all 6 tools to improve LLM tool selection and user experience.

Read-only tools (4):

Tool Title Annotation
definition Go to Definition ReadOnlyHint: true
references Find References ReadOnlyHint: true
diagnostics Get Diagnostics ReadOnlyHint: true
hover Hover ReadOnlyHint: true

Destructive tools (2):

Tool Title Annotation
edit_file Edit File DestructiveHint: true
rename_symbol Rename Symbol DestructiveHint: true

Changes

  • Add mcp.WithToolAnnotation() to all 6 tool definitions in tools.go
  • Bump mcp-go from v0.25.0 to v0.26.0 for annotation support

Benefits

Tool annotations help MCP clients (like Claude Desktop):

  • Display human-readable titles in the tool list
  • Warn users before executing destructive operations
  • Enable better auto-approval policies for safe read-only tools

References

🤖 Generated with Claude Code

Add tool annotations (title, readOnlyHint, destructiveHint) to all 6 MCP tools:

Read-only tools (4):
- definition: Go to Definition
- references: Find References
- diagnostics: Get Diagnostics
- hover: Hover Information

Destructive tools (2):
- edit_file: Edit File
- rename_symbol: Rename Symbol

These annotations help LLMs and clients understand tool behavior and
make safer tool selection decisions.

Requires mcp-go v0.28.0+ for annotation support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bryankthompson bryankthompson force-pushed the feat/add-tool-annotations branch from ce8b151 to 72b974a Compare December 27, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants