Skip to content

Conversation

@bryankthompson
Copy link

Summary

Add MCP tool annotations to all 33 tools to help AI assistants make better decisions about tool usage and safety.

Annotations Added

Each tool now includes:

  • title - Human-readable tool name
  • readOnlyHint - true for read-only operations
  • destructiveHint - true for operations that modify state
  • openWorldHint - true for all tools (browser automation)

Tool Breakdown

Category Read-Only Destructive Non-Destructive Write
Code Generation (4) 1 1 2
Browser Interaction (18) 4 9 5
API Requests (5) 1 4 0
Response Monitoring (2) 2 0 0
Utility (4) 0 0 4
Total (33) 8 14 11

Examples

Read-only tools (readOnlyHint: true):

  • playwright_screenshot - captures page state without modifying
  • playwright_get_visible_text - reads page content
  • playwright_get - HTTP GET request

Destructive tools (destructiveHint: true):

  • playwright_click - modifies page state by triggering interactions
  • playwright_fill - modifies form values
  • playwright_delete - HTTP DELETE request
  • playwright_close - terminates browser session

Test Results

All 150 existing tests pass.

Motivation

Tool annotations are an MCP spec feature that helps AI assistants:

  1. Make better decisions about when to ask for confirmation
  2. Understand the impact of tool calls on external systems
  3. Prioritize read-only operations when exploring

🤖 Generated with Claude Code

Add ToolAnnotations to all 33 tools to help AI assistants make better
decisions about tool usage:

- title: Human-readable tool name
- readOnlyHint: true for read operations (screenshot, get_*, assert_*)
- destructiveHint: true for modifying operations (click, fill, delete, etc.)
- openWorldHint: true for all tools (browser automation)

Annotation summary:
- 8 read-only tools (screenshot, get_visible_text/html, HTTP GET, etc.)
- 17 destructive tools (click, fill, select, HTTP POST/PUT/DELETE, etc.)
- 8 non-destructive write tools (navigate, hover, resize, etc.)
- All 33 tools have openWorldHint: true (external browser interaction)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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