Skip to main content
Glama

run

Execute TypeScript snippets against the Node SDK in a sandbox to provision, manage, and query AI-native Postgres databases with x402 micropayments. Returns call results, logs, and wallet details.

Instructions

Run a TypeScript snippet against the SDK in a sandbox. r is the Node SDK client (@run402/sdk/node); call docs for its reference. The code is the body of an async function: await r chains, and the value of the last expression (or a return) is the result, e.g. (await r.projects.list()).projects.map((p) => p.id). No filesystem, process, fetch, timers, or imports; console is captured. Returns { status, value, value_ref, shown, total, logs, logs_ref, calls, duration_ms, wallet, error? }; a large value is stored whole and expand_result pages it. Operations that return or consume a one-time secret (grant keys, Handoff and Invite Keys, project credentials, wallet keys) refuse with SECRET_REQUIRES_CLI naming the exact CLI command to hand the person. Any other operation is a run snippet against r.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesTypeScript or JavaScript, run as the body of an async function: top-level await works, and the value of an explicit return or of the last expression statement is the result. `r` is the Node SDK client (`@run402/sdk/node`): await any chain, e.g. `(await r.projects.list()).map(p => p.project_id)` or `await r.project("prj_…").functions.list()`. Types are stripped, not compiled: no enum, no parameter properties. No filesystem, process, fetch, timers, or imports; `console` is captured.
timeout_secondsNoDeadline for the whole run, 60 s by default and at most 300. An SDK call in flight at the deadline completes on its own; the result lists every call that completed.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
logsNo
callsNo
errorNo
shownNo
totalNo
valueNo
statusYes
walletNo
logs_refNo
value_refNo
value_kindNo
duration_msNo
logs_droppedNo
value_windowNo
calls_droppedNo

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?

No annotations exist, so the description carries the full burden. It details sandbox restrictions (no filesystem, process, fetch, timers, imports), async function semantics, return shape, secret refusal, and large-value paging behavior.

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

Conciseness5/5

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

The description is front-loaded with its purpose, then systematically covers code semantics, restrictions, return shape, and special secret handling. Every sentence adds information; there is no filler.

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?

Given the tool's complexity, the description covers sandbox behavior, result format, error condition for secrets, and paging. With an output schema present, return values are sufficiently explained.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description adds an example but mostly restates what the schema already documents for `code`; `timeout_seconds` is fully documented in the schema as well.

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 action: 'Run a TypeScript snippet against the SDK in a sandbox.' It also distinguishes itself from siblings by referencing `docs` for SDK reference and `expand_result` for paging large values.

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

Usage Guidelines5/5

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

Explicitly says when to use the tool: 'Any other operation is a run snippet against r,' and gives an exclusion for one-time secret operations that require the CLI (SECRET_REQUIRES_CLI). Also directs users to `docs` for reference, providing clear alternatives.

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

Deploy Server

Other Tools