Expose any API to an LLM agent as two sandboxed MCP tools (search + execute) on Cloudflare Workers.
Two tools with identical schemas and minimal descriptions. Both accept arbitrary JavaScript code with no input validation, constraints, or parameter guidance. Descriptions lack WHEN/WHY context and actionable error recovery guidance. No output schema documentation. Tool names are generic ('search', 'execute') rather than verb_noun pattern. Security model relies entirely on sandbox isolation with no permission gates or audit trail declarations. Composition is problematic: both tools accept the same input type (code string) with no differentiation in parameter structure.
Execute JavaScript against the API. Use the search tool first to find endpoints, then call api.request({ method, path, query, body, contentType, rawBody }). Example: async () => api.request({ method: "GET", path: "/v1/things" })
Search the API catalog. Write an async arrow function over the `spec` global and return what you find. No network access. Example: async () => Object.entries(spec.paths).filter(([p]) => p.includes("widget"))
Tool names lack action verbs. 'search' and 'execute' are generic and do not convey the specific action (code execution over API catalog vs. code execution against live API). Should be 'search_api_catalog' and 'execute_api_request' to disambiguate.
No input validation or constraints on 'code' parameter. LLMs can pass arbitrary JavaScript including infinite loops, memory exhaustion, or attempts to escape the sandbox. Parameter description lacks format guidance, length limits, or examples of valid code patterns.
Output schema is not documented. LLMs cannot predict what fields to expect from search or execute results, forcing them to guess at response structure and complicating downstream tool composition.
Error handling provides no recovery guidance. If code execution fails (timeout, syntax error, API error), the error message is a raw exception string with no actionable next steps for the LLM.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 46 | 2026-07-28+ | v2 |
No permission gates or scope declarations. Both tools execute arbitrary code with access to the API catalog and outbound HTTP. No audit trail, no per-user authorization, no rate limiting declared.