feat(mcp): Add tool annotations for improved LLM tool understanding #2820
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) to all 15 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.This is an unsolicited contribution to improve the MCP ecosystem. No existing issue to reference.
✅ Checklist
feat(mcp): ...)Testing
Build verification: TypeScript compiles without errors
Annotation format verification: Confirmed annotations follow MCP specification:
readOnlyHint: truefor read-only tools (queries, fetches, lists)destructiveHint: truefor state-modifying tools (create, deploy, cancel)Live verification pending: Full MCP client integration testing requires environment setup with API credentials
Changelog
Added
readOnlyHint: trueto 10 read-only tools:searchDocsTool,listOrgsTool,listProjectsTool,getCurrentWorkerlistRunsTool,getRunDetailsTool,waitForRunToCompleteToollistDeploysTool,listPreviewBranchesToolAdded
destructiveHint: trueto 5 state-modifying tools:createProjectInOrgTool,initializeProjectTool,triggerTaskToolcancelRunTool,deployToolUpdated
registerTool()intools.tsto pass annotation fieldsWhy This Matters
Screenshots
N/A - metadata-only changes with no UI impact