feat: Add tool annotations for improved LLM tool understanding#41
Merged
Jpisnice merged 1 commit intoDec 25, 2025
Merged
Conversation
Add readOnlyHint and destructiveHint annotations to all tools to help LLMs better understand tool behavior and make safer decisions. Changes: - Added readOnlyHint: true to 9 read-only tools (get_component, get_component_demo, list_components, get_component_metadata, get_directory_structure, get_block, list_blocks, list_themes, get_theme) - Added destructiveHint: true to apply_theme (modifies filesystem) - 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 <noreply@anthropic.com>
Owner
|
Hey @triepod-ai thanks for the contribution.ill have a look at the changes and get back to you if i have any doubts.really appreciate the contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds MCP tool annotations (
readOnlyHint,destructiveHint,title) to all 10 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.Changes
Added
readOnlyHint: trueto 9 read-only tools:get_component- fetches component source codeget_component_demo- fetches demo codelist_components- lists available componentsget_component_metadata- fetches component metadataget_directory_structure- fetches repository structureget_block- fetches block source codelist_blocks- lists available blockslist_themes- lists TweakCN themesget_theme- fetches theme detailsAdded
destructiveHint: truetoapply_theme(writes files to filesystem)Added
titleannotations for human-readable displayWhy This Matters
Testing
npm run build)tools/listreturns annotations for all 10 toolsVerification Output
Before/After
Before:
After:
🤖 Generated with Claude Code