MCP lazy loading proxy for AI agents - reduce context window token usage by 90%+
mcp-lazy exposes 2 tools with basic schemas and descriptions, but both suffer from critical gaps. mcp_search_tools has a reasonable description (95 chars) and typed parameters (string, number), but lacks output schema documentation and does not describe what fields the agent should expect in results. mcp_execute_tool has a minimal description (67 chars) that does not explain when to use it, what it modifies, or what the response structure is. Neither tool documents their return types, making it impossible for LLMs to plan downstream calls. The 'arguments' parameter in mcp_execute_tool is typed as record<unknown>, which provides no guidance on what keys/values are valid. Error handling exists but is generic ('Failed to execute') without recovery guidance. No tool annotations (readOnlyHint, destructiveHint) despite mcp_execute_tool being destructive. This is a proxy pattern, not a domain-specific tool suite, which limits the applicability of standard tool patterns, but the patterns still apply to the proxy interface itself.
Execute a specific MCP tool. Use tool_name and server_name from mcp_search_tools results.
Search available MCP tools by keyword. Use this BEFORE calling any MCP tool. Returns matching tool names, server names, and descriptions. Example: mcp_search_tools("query database") → postgres-mcp.query_database
Output schemas not documented. mcp_search_tools returns JSON with 'results' and 'suggestion' fields, but LLMs cannot infer the structure of each result object (does it have tool_name, server_name, description?). mcp_execute_tool returns raw tool output wrapped in JSON, but the agent has no schema to validate or plan with.
mcp_execute_tool description (67 chars) is too brief and does not state that this tool modifies state (WRITE risk). LLMs need explicit guidance: 'Executes a tool on a remote MCP server. This may modify data, send messages, or trigger actions, use with caution.' Current description omits consequences and prerequisites.
No tool annotations. mcp_execute_tool is marked WRITE risk but has no destructiveHint annotation. mcp_search_tools is READ_ONLY but has no readOnlyHint. Annotations enable agents to reason about safety and retry logic.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | 2026-07-28+ | v2 |
'arguments' parameter in mcp_execute_tool is typed as z.record(z.unknown()), providing zero guidance on valid keys or value types. LLMs cannot validate inputs before calling. Should document expected argument structure or provide a discovery mechanism.
Error messages lack recovery guidance. 'Failed to execute tool_name on server_name: message' tells the agent nothing actionable. Should include: (1) error classification (retryable vs fatal), (2) suggested next step (e.g., 'Try mcp_search_tools with different keywords'), (3) available alternatives.