MCP server optimization toolkit for analyzing token usage, health checking, and scoping MCP servers to projects
5 tools with mixed quality. All have descriptions (10-200 chars, mostly adequate), but input schemas are present but lack rigor: parameters have types and descriptions, but many lack enums for constrained values, and output schemas are undocumented. Tool naming follows verb_noun convention (analyze_, check_, optimize_, call_, inspect_) but lacks clarity on scope and side effects. No error handling guidance, no recovery paths, no idempotent/destructive hints. Security concerns: call_mcp_tool accepts arbitrary env vars and tool args as JSON strings, risking injection. Composition is reasonable (each tool has one job), but no pagination, no batch variants, and responses are not documented.
Parse session JSONL files to extract MCP server tool usage frequency, token consumption, and waste estimates
Perform one-shot tool invocation on an MCP server via stdio or HTTP transport
Enumerate configured MCP servers, attempt real connections, check environment variables, detect duplicate tools, and output structured JSON health report
Extract tool schemas from an MCP server via stdio or HTTP transport
Analyze session history to determine which MCP servers are relevant to the current project, then generate a minimal project-scoped .mcp.json
call_mcp_tool accepts 'args' as free-form JSON string and 'env' as array of KEY=VALUE strings. No validation, sanitization, or injection guards. LLM could pass malicious payloads (command injection, path traversal). Requires strict input validation and sandboxing.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields. analyze_session, check_mcp_health, optimize_mcp_config, inspect_mcp_server all return unstructured results.
Parameters lack enums and constraints. 'scope' in analyze_session has enum ['project','all'] (good), but 'server' in check_mcp_health, 'project_dir' in optimize_mcp_config, and 'url'/'server' in call_mcp_tool and inspect_mcp_server accept free-form strings with no validation hints or format constraints.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 41 | 2026-07-28+ | v2 |
No error handling guidance. Tools return success/failure but do not tell LLM what to do next (retry? ask user? fatal?). No recovery paths, no actionable error messages, no categorization of error types.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). optimize_mcp_config writes .mcp.json (destructive), but LLM has no signal that this is a write operation. call_mcp_tool can invoke arbitrary tools with side effects, but no hint to the LLM.