Skip to main content
Glama

Dry-run a block with sample input

test_block

Runs one saved Process block in isolation with sample input and optional dry-run stubs to validate output, surface errors, and self-correct before deployment.

Instructions

Runs ONE saved block in isolation with sample input (the rest of the flow does NOT run) and returns its output — or, on error, a 400 whose details carry the JS/sandbox error. Use it to test a Process block and self-correct BEFORE deploying. input is the upstream value the block reads as input; request simulates an API Endpoint flow's request global. The block's code really runs (may make HTTP/SQL calls), so it needs flows:execute. Save the block first (set_workspace_content), then test by its blockId. PASS dryRun:true WHILE ITERATING: the block still runs on the real engine, but fetch and sql.query are answered from stubs and reach NOTHING — no third-party API calls burned, no writes to a real database. The reply's dryRun report lists every URL and query the block would have hit, which is also how you discover what it actually talks to. Supply dryRunHttp/dryRunSql to control the canned answers; unstubbed calls get an empty 200 / no rows. Drop dryRun for a final real test before deploying. The reply carries a usage block (statements, limitStatements, durationMs, fetches, storeOps) — SIZE YOUR BATCHES FROM IT instead of guessing: if a run uses a small fraction of the statement budget, do more work per call rather than paying for extra round-trips.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "workspaceId": "<workspaceId>",
      "blockId": "<blockId>"
    },
    "name": "test_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputNoSample upstream output the block reads as `input`.
dryRunNoRun on the real engine but stub fetch/sql so nothing outside is reached. Use while iterating.
blockIdYes
requestNoSimulate an API Endpoint flow's `request` global (method/headers/query/body/params).
dryRunSqlNoCanned SQL results, first match wins. Implies dryRun:true.
dryRunHttpNoCanned HTTP replies, first match wins. Implies dryRun:true.
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.53.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations supplied the description carries the full burden, and it does: it discloses that the block code really executes, may make HTTP/SQL calls, requires flows:execute, returns a 400 whose `details` carry the JS/sandbox error, and that dryRun stubs fetch and sql so nothing external is reached. It further explains stub fallback behavior (unstubbed calls get an empty 200 / no rows) and the `usage` budget fields, which are non-obvious side effects an agent cannot infer from the schema.

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?

Long but dense and front-loaded: purpose and return shape come first, then prerequisites, then the dryRun workflow, then the usage-budget advice. Nearly every sentence adds operational information, though the closing batch-sizing paragraph is slightly tangential to invoking this tool and could be trimmed or moved.

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 7-parameter tool with nested objects and no output schema, the description covers everything an agent needs: required setup order, permission requirement, what the success reply contains (`usage` block, `dryRun` report), and what the error reply looks like. Nothing material is left to guesswork.

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 71%, and the description covers the remainder with real meaning beyond the schema: `input` is the upstream value the block reads as `input`, `request` simulates an API Endpoint flow's `request` global, `dryRunHttp`/`dryRunSql` are first-match canned answers and imply dryRun, and `dryRun:true` is for iteration. Only `workspaceId` is left implicit, which is trivial.

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?

Opens with a specific verb, resource, and scope: 'Runs ONE saved block in isolation with sample input (the rest of the flow does NOT run) and returns its output.' It also names the failure mode (400 with `details`) and distinguishes this from executing a whole flow, so an agent can separate it from siblings like execute_workspace or call_endpoint.

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?

Gives explicit prerequisites ('Save the block first (set_workspace_content), then test by its blockId'), an explicit workflow rule ('PASS dryRun:true WHILE ITERATING', 'Drop dryRun for a final real test before deploying'), and the situation that selects the tool (test a Process block and self-correct before deploying). Both when-to-use and the when-to-stop condition are stated.

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