Skip to content

Conversation

@jonathannorris
Copy link
Member

This PR enhances all MCP tool definitions with proper annotations to improve AI assistant behavior and user experience.

Changes Made

  • 🚨 Destructive Hints: Added destructiveHint: true to operations that can affect production environments (delete, update, enable/disable targeting)
  • 📖 Human-Readable Titles: Added title annotations to all tools for better UI display (e.g., "List Feature Flags", "Create Variable")
  • 👀 Read-Only Hints: Added readOnlyHint: true to all non-destructive operations (list, get, fetch)

Impact

  • AI assistants will now properly warn users before executing destructive operations
  • Tool names are more user-friendly in UI contexts
  • Clear categorization between read-only and modifying operations
  • Better safety guardrails for production environment changes

@jonathannorris jonathannorris requested a review from a team as a code owner July 24, 2025 19:53
@jonathannorris jonathannorris requested review from JamieSinn, Copilot and jsalaber and removed request for a team July 24, 2025 19:53

This comment was marked as outdated.

Copy link
Member

@JamieSinn JamieSinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot caught one missing

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.',
Copy link

Copilot AI Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warning message format is inconsistent with other tools. Other destructive operations use '⚠️ IMPORTANT:' while this uses '⚠️ WARNING:'. Consider using '⚠️ IMPORTANT:' for consistency.

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.',

Copilot uses AI. Check for mistakes.
@jonathannorris jonathannorris merged commit 410dba6 into feat-mcp-server Jul 25, 2025
8 checks passed
@jonathannorris jonathannorris deleted the feat-mcp-destructive-hints branch July 25, 2025 14:50
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants