Skip to content

Conversation

@triepod-ai
Copy link

Summary

This PR adds the missing MCP tool annotations (destructiveHint and openWorldHint) to all 26 tools in chrome-devtools-mcp.

Changes

  • Updated ToolDefinition.ts: Added optional destructiveHint and openWorldHint fields to the annotations interface
  • Added annotations to all 26 tools:
    • openWorldHint: true for all tools (browser automation inherently interacts with external websites)
    • destructiveHint: true for closePage, navigatePage, and evaluateScript (operations that can cause irreversible changes)
    • destructiveHint: false for other write operations (reversible modifications like click, fill, hover)

Why These Annotations Matter

Per the MCP specification:

  • openWorldHint: Indicates tools that interact with an "open world" of external entities. All browser automation tools interact with external websites, so this is true for all tools.
  • destructiveHint: Indicates tools that may perform irreversible updates. This helps AI assistants determine when to request user confirmation.

Tools Summary

Category Tools destructiveHint
Navigation closePage, navigatePage true (irreversible)
Script evaluateScript true (can modify page state)
Input click, hover, fill, drag, fillForm, uploadFile, pressKey, handleDialog false
Debugging screenshot, takeSnapshot, listConsoleMessages, getConsoleMessage false
Network listNetworkRequests, getNetworkRequest N/A (readOnly)
Performance startTrace, stopTrace, analyzeInsight N/A (readOnly)
Other newPage, selectPage, listPages, resizePage, emulate, waitFor false or N/A

🤖 Generated with Claude Code

@google-cla
Copy link

google-cla bot commented Dec 29, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@triepod-ai triepod-ai changed the title Add destructiveHint and openWorldHint tool annotations feat: Add destructiveHint and openWorldHint tool annotations Dec 29, 2025
This PR adds the missing MCP tool annotations to improve AI assistant
understanding of tool capabilities:

- openWorldHint: true for all 26 tools (browser automation = external interaction)
- destructiveHint: true for closePage, navigatePage, evaluateScript (irreversible changes)
- destructiveHint: false for all other write operations (reversible modifications)

These annotations help AI assistants make better decisions about:
- Which tools require user confirmation before execution
- Which tools interact with external systems
- Which operations may cause data loss

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

Thank you, own thank you this is if it was an under human hand I will not succeed any step of my life ha ha ha ha ha ha ha ha thank you

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.

2 participants