browser_navigate
browser navigate
io.github.microsoft/playwright-mcp
Playwright Tools for MCP
run in your project directory
claude mcp add playwright-mcp -- npx -y @playwright/mcp
setup guides: Claude Code Claude Desktop Cursor VS Code Zed Windsurf Cline Gemini CLI Grok LangChain
Adds it for this project only. Append --scope user to make it available everywhere. Claude Code docs
browser_navigate
browser navigate
browser_snapshot
browser snapshot
browser_click
browser click
browser_type
browser type
browser_take_screenshot
browser take screenshot
browser_tab_list
browser tab list
browser_console_messages
browser console messages
browser_network_requests
browser network requests
Mutating and Read-only are read off each tool's name, not its schema — a hint, not a guarantee. Check the server's own documentation before granting access.
Generated September 19, 2026
Effective MCP tools balance power with usability, robustness with simplicity, and flexibility with clarity. This comprehensive guide covers the principles, patterns, and practices for designing tools that serve users well, integrate smoothly, and maintain quality across thousands of servers.
Successful tool design rests on five principles:
Clarity
Consistency
Completeness
Discoverability
Simplicity
Good names make tools easy to find and use:
Naming Patterns
create_issue, list_files, get_user create not make, list not get_all create_payment_plan Category-Based Naming
github_search_repos, github_create_issue stripe_create_customer, stripe_list_charges fs_read_file, fs_list_directory Namespace Conventions
get_time, get_weather file_create, database_query github_get_github_user → github_get_user Well-designed parameters improve usability:
Parameter Naming
repository not repo user_id not id owner not owner_name Parameter Types
Parameter Constraints
Well-designed input schemas prevent errors:
{
"type": "object",
"properties": {
"repository": {
"type": "string",
"description": "GitHub repository in owner/repo format",
"pattern": "^[a-zA-Z0-9_-]+/[a-zA-Z0-9._-]+$"
},
"title": {
"type": "string",
"description": "Issue title",
"minLength": 1,
"maxLength": 200
},
"labels": {
"type": "array",
"items": {
"type": "string"
},
"description": "Labels to assign",
"maxItems": 10
},
"priority": {
"type": "string",
"enum": ["low", "medium", "high"],
"description": "Issue priority",
"default": "medium"
}
},
"required": ["repository", "title"]
}
Schema Best Practices
Clear output schemas improve integrations:
Response Structure
Success Response Example
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Created issue ID"
},
"url": {
"type": "string",
"description": "URL to issue on GitHub"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "When issue was created"
}
}
}
Error Response Format
{
"error": {
"code": "invalid_repository",
"message": "Repository not found: owner/repo",
"details": {
"requested": "invalid/repo"
}
}
}
Managing schema evolution:
Backward Compatibility
Version Management
Different error types require different handling:
Validation Errors (4xx codes)
Authentication Errors (4xx codes)
Resource Not Found (4xx codes)
Rate Limit (429)
Server Errors (5xx codes)
Good error messages guide users to solutions:
Clear Error Message Format
{
"error": {
"code": "invalid_email",
"message": "Email address is not valid: 'user@invalid'",
"field": "email",
"suggestion": "Email must include domain and TLD (e.g., user@example.com)"
}
}
Error Message Best Practices
Helping clients recover from errors:
Retryable Errors
Non-Retryable Errors
Timeout Handling
Handling large result sets:
Pagination Pattern
{
"items": [...],
"pagination": {
"total": 1250,
"offset": 0,
"limit": 50,
"has_more": true
}
}
Parameters for Filtering
limit: Number of items (default: 50, max: 500) offset: Starting position (default: 0) query: Text search filters: Object with filter criteria sort: Sorting field and direction Filtering Examples
filters: {status: "open"} filters: {created_after: "2025-01-01"} Making tools discoverable and useful:
Search Features
Search Result Ranking
Efficient bulk processing:
Batch Pattern
Tool: batch_create_users
Input: {
"items": [
{"name": "Alice", "email": "alice@example.com"},
{"name": "Bob", "email": "bob@example.com"}
]
}
Output: {
"results": [
{"status": "success", "id": 1},
{"status": "error", "error": "invalid_email"}
],
"summary": {
"total": 2,
"succeeded": 1,
"failed": 1
}
}
Batch Best Practices
Example tool for repository operations:
Tool: Create GitHub Issue
{
"name": "github_create_issue",
"description": "Create a new issue in a GitHub repository",
"inputSchema": {
"type": "object",
"properties": {
"owner": {
"type": "string",
"description": "Repository owner username"
},
"repo": {
"type": "string",
"description": "Repository name"
},
"title": {
"type": "string",
"description": "Issue title (1-200 chars)",
"minLength": 1,
"maxLength": 200
},
"body": {
"type": "string",
"description": "Issue description in markdown"
},
"labels": {
"type": "array",
"items": {"type": "string"},
"description": "Labels to assign"
},
"assignees": {
"type": "array",
"items": {"type": "string"},
"description": "GitHub usernames to assign"
}
},
"required": ["owner", "repo", "title"]
}
}
Tool: List Repositories
{
"name": "github_list_repos",
"description": "List repositories for a user or organization",
"inputSchema": {
"type": "object",
"properties": {
"user": {
"type": "string",
"description": "GitHub username or org name"
},
"type": {
"type": "string",
"enum": ["all", "public", "private"],
"default": "all"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 30
},
"offset": {
"type": "integer",
"minimum": 0,
"default": 0
}
},
"required": ["user"]
}
}
Example tool for database queries:
Tool: Execute Query
{
"name": "db_query",
"description": "Execute a SQL query and return results",
"inputSchema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "SQL SELECT query"
},
"parameters": {
"type": "object",
"description": "Query parameters for parameterized queries"
},
"timeout": {
"type": "integer",
"description": "Query timeout in seconds",
"default": 30,
"maximum": 300
}
},
"required": ["query"]
}
}
Example tool for data analysis:
Tool: Get Analytics
{
"name": "analytics_get_metrics",
"description": "Get analytics metrics for a time period",
"inputSchema": {
"type": "object",
"properties": {
"metric": {
"type": "string",
"enum": ["pageviews", "users", "revenue"],
"description": "Which metric to retrieve"
},
"start_date": {
"type": "string",
"format": "date",
"description": "Start date (YYYY-MM-DD)"
},
"end_date": {
"type": "string",
"format": "date",
"description": "End date (YYYY-MM-DD)"
},
"group_by": {
"type": "string",
"enum": ["day", "week", "month"],
"default": "day"
}
},
"required": ["metric", "start_date", "end_date"]
}
}
Making tools fast and responsive:
Performance Targets
Optimization Techniques
Supporting growth:
Caching Strategy
Database Optimization
Preventing abuse:
Rate Limiting
Size Limits
Helping users understand tools:
Example Format
Tool: github_create_issue
Example request:
{ “owner”: “anthropics”, “repo”: “anthropic-sdk-python”, “title”: “Add support for streaming”, “body”: “We should add streaming support to improve performance”, “labels”: [“enhancement”, “api”] }
Example response:
{ “id”: 12345, “url”: “https://github.com/anthropics/anthropic-sdk-python/issues/12345”, “created_at”: “2025-01-15T10:30:00Z” }
Showing common failure cases:
Invalid Input Example
Request: {"owner": "user", "repo": ""}
Error: {"code": "invalid_repo", "message": "Repo name cannot be empty"}
Authentication Error Example
Request: Valid parameters but missing auth
Error: {"code": "unauthorized", "message": "API key required"}
Before releasing a tool:
Functional Tests
Non-Functional Tests
Documentation Tests
Effective tool design makes MCP servers more useful, reliable, and maintainable. By following these principles and patterns, tool builders create tools that serve users well and integrate smoothly with other systems.
Key design principles:
Well-designed tools become the foundation of successful MCP servers and the broader ecosystem.
Comprehensive 20,000+ word guide covering tool naming conventions, parameter design, schema creation, error handling patterns, usability features, real-world examples, performance optimization, and testing strategies for designing effective, user-friendly MCP tools.
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect