-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Summary
The current MCP tool schemas for chrome-devtools-mcp are very comprehensive but verbose, which increases token usage for AI agents. By applying schema optimization techniques, we can reduce token consumption by ~40% while maintaining full functionality and clarity.
Motivation
AI agents consuming MCP tool schemas pay a token cost for every tool discovery. Verbose schemas with:
- Extensive
oneOfdescription blocks - Multiple examples per field (3-5 examples)
- Redundant explanatory text
...lead to unnecessary token usage without adding value for AI comprehension.
Proposed Solution
Apply the following optimizations:
1. Remove Verbose oneOf Descriptions
Before:
enum: ['summary', 'detailed', 'analytics'],
oneOf: [
{
const: 'summary',
description: 'Basic results with session info, relevance scores, and key matches'
},
{
const: 'detailed',
description: 'Comprehensive results including entity/relationship details'
},
{
const: 'analytics',
description: 'Full analytics including search performance and scoring'
}
]After:
enum: ['summary', 'detailed', 'analytics'],
description: 'Result format: summary, detailed, or analytics'AI agents can infer meaning from enum values + concise description.
2. Reduce Example Arrays
Before:
examples: ['30d', '3m', '1y', '7d', '24h']After:
examples: ['30d']One representative example is sufficient for AI understanding.
3. Condense Descriptions
Before:
description: 'Maximum number of results to return (minimum 1, maximum 200, default: 50)'After:
description: 'Max results (1-200, default: 50)'AI agents parse structured data (min/max/default) from schema properties, not descriptions.
Benefits for Chrome DevTools MCP
Given the extensive tool catalog in chrome-devtools-mcp (navigation, screenshots, performance, network, etc.), applying these optimizations could yield significant token savings while improving AI agent performance.
Compatibility
These optimizations:
- ✅ Maintain full JSON Schema compliance
- ✅ Keep all validation rules (patterns, min/max, required fields)
- ✅ Preserve error messages for user guidance
- ✅ Do not break existing integrations
Additional Context: Token Usage Impact
Current State:
The chrome-devtools-mcp currently consumes ~17,000 tokens just for initial tool discovery.
This means a single MCP consumes over two-thirds of the recommended token budget, leaving minimal room for:
- Other essential MCPs (file system, git, database, etc.)
- Actual conversation context
- User prompts and responses
After Optimization (estimated):
Applying the 40% reduction
- Current: ~17,000 tokens
- Optimized: ~10,200 tokens
- Savings: ~6,800 tokens
This would free up enough tokens for 2-3 additional medium-sized MCPs or significantly more conversation context.