Skip to content

feat: Add tool annotations for improved LLM tool understanding#111

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

feat: Add tool annotations for improved LLM tool understanding#111
bryankthompson wants to merge 1 commit intoLaurieWired:mainfrom
bryankthompson:feat/add-tool-annotations

Conversation

@bryankthompson
Copy link

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint, title) to all 27 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.

Changes

  • Added readOnlyHint: true to 19 read-only tools:

    • list_methods, list_classes, list_segments, list_imports, list_exports, list_namespaces, list_data_items, list_functions, list_strings
    • search_functions_by_name
    • decompile_function, decompile_function_by_address, disassemble_function
    • get_function_by_address, get_current_address, get_current_function
    • get_xrefs_to, get_xrefs_from, get_function_xrefs
  • Added destructiveHint: true to 8 tools that modify data:

    • rename_function, rename_data, rename_variable, rename_function_by_address
    • set_decompiler_comment, set_disassembly_comment
    • set_function_prototype, set_local_variable_type
  • Added title annotations for human-readable display on all tools

  • Bump MCP SDK from >=1.2.0 to >=1.8.0 for annotation support

  • Updated requirements.txt to match

Why This Matters

Tool annotations provide semantic metadata that helps LLMs:

  • Understand which tools are safe to call without side effects (readOnlyHint: true)
  • Know when extra caution is needed (destructiveHint: true)
  • Display human-readable tool names (title)
  • Make better decisions about tool execution order and safety

Testing

  • Server builds successfully
  • Import test passes (from mcp.types import ToolAnnotations)
  • Live verification: Started server and confirmed tools/list returns all 27 tools with proper annotations
  • Annotation values match actual tool behavior (read-only vs destructive)

Live Verification Output

Total tools: 27

Tool Name                           Title                          ReadOnly   Destructive 
---------------------------------------------------------------------------------------
decompile_function                  Decompile Function             True       N/A         
list_methods                        List Methods                   True       N/A         
rename_function                     Rename Function                N/A        True        
set_function_prototype              Set Function Prototype         N/A        True        
...

🤖 Generated with Claude Code

Add readOnlyHint and destructiveHint annotations to all 27 tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to 19 read-only tools (list, get, search, decompile, disassemble)
- Added destructiveHint: true to 8 tools that modify data (rename, set)
- Added title annotations for human-readable display
- Bump MCP SDK from >=1.2.0 to >=1.8.0 for annotation support
- Updated requirements.txt to match

This improves tool safety metadata for MCP clients.

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

Co-Authored-By: Claude <[email protected]>
@bryankthompson
Copy link
Author

Friendly ping! 👋 Just checking if this PR is still on your radar. Happy to address any feedback or make adjustments if needed. No rush - just wanted to make sure it didn't slip through the cracks.

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