Skip to main content
Glama

Run catalog code

execute
Read-onlyIdempotent

Run a JavaScript async function in an isolated sandbox, composing catalog_search, model_detail, offer_compare, benchmark_results, provider_list, and benchmark_list as catalog.* methods. Return a small JSON value. Example: async () => { const page = await catalog.catalog_search({query: 'claude', page_size: 5}); return page.data.models.map(m => ({slug: m.slug, prices: m.bestOffer?.prices})); }. No network, secrets, or database binding is exposed. Shared worldwide execution budgets: 100 per UTC minute and 5000 per UTC day. Limits: 30 executions per client per minute (IPv6 /64), 20 catalog calls and read units (offer_compare uses 5), at most two concurrent calls, 5 seconds wall time, 50ms sandbox CPU, 32KiB code, 64KiB JSON output. JavaScript only; no imports or TypeScript syntax. Use /mcp?mode=code for only search + execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsYes
callsYes
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the annotations: discloses sandbox isolation ('no network, secrets, or database binding'), worldwide and per-client rate budgets, per-execution resource caps (20 catalog calls, read units, 2 concurrent, 5s wall, 50ms CPU, 32KiB code, 64KiB output), and language restrictions. The readOnly/idempotent hints are reinforced rather than contradicted by the 'no network/secrets' claim.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and example are front-loaded well, and each sentence carries information. The final limits sentence is a dense run-on of numeric caps, which is informative but harder to scan than a structured list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a code-execution tool with an existing output schema, this covers execution semantics, environment, limits, and language constraints, so nothing an agent needs to invoke it correctly is missing. Return shape is left to the output schema, which is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single 'code' param has no schema description, but the description fully compensates: it specifies an async function returning small JSON, supplies a concrete example, and lists syntax constraints (JS only, no imports or TypeScript, size cap). That is more than enough to construct a valid value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: run a JavaScript async function in an isolated sandbox, and names the exact catalog.* methods it composes. This distinguishes it cleanly from the sibling tools it wraps and makes the tool's role unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Frames the use case clearly (compose multiple catalog methods in one call) and adds a routing hint ('Use /mcp?mode=code for only search + execute'). It never explicitly says when NOT to use it, e.g. that a simple single-field lookup should go straight to catalog_search, so alternatives are only implicitly addressed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources