feat: add destructive hints, titles, and readonly hints to mcp tools#471
Merged
jonathannorris merged 2 commits intofeat-mcp-serverfrom Jul 25, 2025
Merged
feat: add destructive hints, titles, and readonly hints to mcp tools#471jonathannorris merged 2 commits intofeat-mcp-serverfrom
jonathannorris merged 2 commits intofeat-mcp-serverfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances MCP tool definitions by adding structured annotations to improve AI assistant behavior and user experience. The changes focus on adding safety guardrails and better UI display for tools that interact with DevCycle's feature flag management system.
- Added destructive hints to operations that can affect production environments
- Added human-readable titles to all tools for better UI display
- Added read-only hints to distinguish non-destructive operations
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/mcp/tools/variableTools.ts | Added annotations for variable management operations with appropriate destructive/read-only hints |
| src/mcp/tools/selfTargetingTools.ts | Enhanced self-targeting tools with titles and destructive hints for override clearing |
| src/mcp/tools/resultsTools.ts | Added read-only annotations to evaluation reporting tools |
| src/mcp/tools/projectTools.ts | Enhanced project management tools with appropriate annotations |
| src/mcp/tools/featureTools.ts | Comprehensive annotation updates for feature flag operations including targeting and variations |
| src/mcp/tools/environmentTools.ts | Added annotations to environment management tools |
| src/mcp/tools/customPropertiesTools.ts | Enhanced custom property tools with destructive hints for modify operations |
| name: 'update_feature_variation', | ||
| description: | ||
| 'Update an existing variation by key. Include dashboard link in the response.', | ||
| 'Update an existing variation by key. ⚠️ WARNING: Updating a feature variation may affect production environments. Include dashboard link in the response.', |
There was a problem hiding this comment.
The warning message format is inconsistent with other tools. Other destructive operations use '
Suggested change
| 'Update an existing variation by key. ⚠️ WARNING: Updating a feature variation may affect production environments. Include dashboard link in the response.', | |
| 'Update an existing variation by key. ⚠️ IMPORTANT: Updating a feature variation may affect production environments. Include dashboard link in the response.', |
JamieSinn
approved these changes
Jul 25, 2025
jonathannorris
added a commit
that referenced
this pull request
Jul 25, 2025
…471) * feat: add destructive hints, titles, and readonly hints to mcp tools * fix: update tool descriptions
jonathannorris
added a commit
that referenced
this pull request
Aug 11, 2025
…471) * feat: add destructive hints, titles, and readonly hints to mcp tools * fix: update tool descriptions
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.
This PR enhances all MCP tool definitions with proper annotations to improve AI assistant behavior and user experience.
Changes Made
destructiveHint: trueto operations that can affect production environments (delete, update, enable/disable targeting)titleannotations to all tools for better UI display (e.g., "List Feature Flags", "Create Variable")readOnlyHint: trueto all non-destructive operations (list, get, fetch)Impact