Skip to content

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

Closed
bryankthompson wants to merge 2 commits intoline:mainfrom
bryankthompson:feat/add-tool-annotations
Closed

feat: Add tool annotations for improved LLM tool understanding#340
bryankthompson wants to merge 2 commits intoline:mainfrom
bryankthompson:feat/add-tool-annotations

Conversation

@bryankthompson
Copy link
Contributor

Summary

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

Changes

  • Added readOnlyHint: true to read-only tools:

    • get_profile - fetches user profile information
    • get_message_quota - queries message quota/usage
    • get_rich_menu_list - lists rich menus
  • Added destructiveHint: true to tools that modify data:

    • push_text_message - sends text message to user
    • push_flex_message - sends flex message to user
    • broadcast_text_message - broadcasts text to all users
    • broadcast_flex_message - broadcasts flex message to all users
    • create_rich_menu - creates and sets default rich menu
    • delete_rich_menu - deletes a rich menu
    • set_rich_menu_default - sets default rich menu
    • cancel_rich_menu_default - cancels default rich menu
  • Added title annotations for human-readable display

Why This Matters

  • Annotations provide semantic metadata that helps LLMs understand tool behavior
  • MCP clients can make better decisions about tool execution (e.g., auto-approve read-only tools)
  • Enables safer tool execution by distinguishing read-only from destructive operations
  • Improves UX by showing appropriate warnings/confirmations for destructive tools

Testing

  • Server builds successfully (npm run build)
  • Linter passes (prettier format check)
  • TypeScript compiles without errors
  • Live verification: Started server and confirmed tools/list returns annotations for all 11 tools
  • Annotation values match actual tool behavior (read-only vs destructive)

Verification Output

Total tools: 11

Tool Name                      Title                          ReadOnly   Destructive
--------------------------------------------------------------------------------
push_text_message              Push Text Message              -          True      
push_flex_message              Push Flex Message              -          True      
broadcast_text_message         Broadcast Text Message         -          True      
broadcast_flex_message         Broadcast Flex Message         -          True      
get_profile                    Get Profile                    True       -         
get_message_quota              Get Message Quota              True       -         
get_rich_menu_list             Get Rich Menu List             True       -         
delete_rich_menu               Delete Rich Menu               -          True      
set_rich_menu_default          Set Rich Menu Default          -          True      
cancel_rich_menu_default       Cancel Rich Menu Default       -          True      
create_rich_menu               Create Rich Menu               -          True

🤖 Generated with Claude Code

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

Changes:
- Added readOnlyHint: true to read-only tools (get_profile, get_message_quota, get_rich_menu_list)
- Added destructiveHint: true to tools that modify data (push/broadcast messages, rich menu management)
- Added title annotations for human-readable display

This improves tool safety metadata for MCP clients.

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

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

CLAassistant commented Dec 23, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ eucyt
❌ web-flow
You have signed the CLA already but the status is still pending? Let us recheck it.

@bryankthompson
Copy link
Contributor Author

@CLAassistant check

@eucyt eucyt self-requested a review January 13, 2026 06:37
@eucyt eucyt self-assigned this Jan 13, 2026
@eucyt
Copy link
Contributor

eucyt commented Jan 30, 2026

@bryankthompson
The content itself looks fine, but it seems that commits made by AI cannot pass the CLA signature.
Could you please commit the changes yourself and create a new PR?

@bryankthompson
Copy link
Contributor Author

Closing this PR and recreating as #366 to fix the CLA signature issue. The new PR has the same changes committed without the AI co-author per @eucyt's request.

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.

4 participants