mcp-playwright
mcp-playwright copied to clipboard
feat: Add MCP tool annotations for improved AI understanding
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 namereadOnlyHint- true for read-only operationsdestructiveHint- true for operations that modify stateopenWorldHint- 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 modifyingplaywright_get_visible_text- reads page contentplaywright_get- HTTP GET request
Destructive tools (destructiveHint: true):
playwright_click- modifies page state by triggering interactionsplaywright_fill- modifies form valuesplaywright_delete- HTTP DELETE requestplaywright_close- terminates browser session
Test Results
All 150 existing tests pass.
Motivation
Tool annotations are an MCP spec feature that helps AI assistants:
- Make better decisions about when to ask for confirmation
- Understand the impact of tool calls on external systems
- Prioritize read-only operations when exploring
🤖 Generated with Claude Code