MCP server providing Code Mode execution tools for API discovery and execution, GraphQL introspection, SPARQL endpoint querying, and data staging with auto-SQL capabilities
Treasury MCP exhibits significant definition quality gaps. Tool descriptions are present but lack LLM-optimization guidance (e.g., catalog_search description is 400+ chars, exceeds 200-char baseline). Input schemas use Zod but lack complete type coverage and parameter descriptions are sparse or missing. The execute, graphql_execute, and sparql_execute tools accept arbitrary code strings with minimal validation guidance. No output schemas are documented. Error handling is absent, no recovery guidance, categorization, or actionable error messages. Security concerns: execute tools run arbitrary code in sandboxed V8 but lack clear permission/scope declarations. Tool composition is weak: catalog_search and search overlap functionally, creating LLM disambiguation burden.
Search the API catalog (endpoints). Returns matching endpoints with full parameter docs. Use this to discover API capabilities before calling execute. Categories: (dynamic based on catalog) USAGE IN execute: - api.get(path, params) for GET, api.post(path, body, params) for POST - Path params like /lookup/{id} are auto-interpolated from params: api.get('/lookup/{id}', {id: 'ENSG...'}) - Remaining params become query string - Large responses (>100KB) are auto-staged: check result.__staged, return the staging info, use query_data to explore - Use limit/pagination params to control response size. Large datasets auto-stage for SQL queries.
Execute JavaScript code against the API with sandboxed V8 isolate. Code runs with api.get/api.post wrappers, catalog search helpers (searchSpec, listCategories, getEndpoint), console.log capture, and optional filesystem access. Large responses (>100KB) auto-stage into SQLite for SQL querying.
Execute JavaScript code against a GraphQL endpoint with sandboxed V8 isolate. Code runs with gql.query(queryString, variables?), schema introspection helpers (schema.types(), schema.type(), schema.search()), staging helpers (db.stage(), db.queryStaged()), optional REST API access (api.get/api.post), console.log capture, and optional filesystem access. Large responses auto-stage into SQLite.
Search the OpenAPI spec (operations across paths). Write JavaScript code to search the spec, or use legacy query/category arguments for keyword search. Available functions: searchPaths(query, maxResults=10), listTags(), getOperation(idOrPath), describeOperation(idOrPath), spec object. Use to discover endpoints, then write code in execute to call them.
Overlapping tool functionality: catalog_search and search both perform keyword-based discovery over API specs. LLMs cannot disambiguate when to use each. Consolidate into a single search tool with optional mode parameter.
execute, graphql_execute, and sparql_execute accept arbitrary code strings with no input validation, format constraints, or examples. Descriptions lack guidance on what code patterns are safe, what APIs are available, or how to handle errors. LLMs will guess at syntax.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields. catalog_search returns ApiEndpoint objects but structure is not specified. execute returns arbitrary JavaScript output with no type contract.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 37 | 2026-07-28+ | v2 |
Execute JavaScript code against a SPARQL endpoint with sandboxed V8 isolate. Code runs with sparql.query(queryString, opts?), sparql.ask(queryString), sparql.raw(queryString, opts?), injected prefix map (prefixes, prefixHeader), staging helpers (db.stage(), db.queryStaged()), console logging, and optional filesystem access. Large responses (>30KB) auto-stage into SQLite.
Error handling is absent. No recovery guidance, error categorization, or actionable messages. If execute fails, LLM receives raw V8 error or timeout with no hint on retry strategy, user-fixable issues, or next steps.
Security: execute/graphql_execute/sparql_execute run arbitrary code in sandboxed V8 but lack explicit permission/scope declarations. No audit trail guidance, rate limiting, or confirmation step for destructive operations. Agents cannot reason about blast radius.