Skip to main content
Glama

Run or resume a checkpointed structured ZCode batch

zcode_batch_run
DestructiveIdempotent

Run or resume structured item batches with deterministic keys, append-only JSONL checkpoints, bounded retries, and circuit breaking for quota, login, or provider-route blockers.

Instructions

Execute or resume a low-CPU structured batch with deterministic item keys, append-only JSONL checkpoints (manifest.jsonl, results.jsonl, summary.json, blocked.json), bounded retry (0 or 1), and circuit breaking on quota/rate-limit, login blockers, or provider route mismatch.

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": {
      "batchId": "<batchId>",
      "task": "<task>",
      "schema": "<schema>",
      "items": "<items>"
    },
    "name": "zcode_batch_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYes
itemsYes
modelNo
schemaYes
batchIdYes
providerNo
domainRuleNo
maxRetriesNo
templateIdNo
includeItemsNo
reserveSlotsNo
itemTimeoutMsNo
capacityWaitMsNo
maxConcurrencyNo
microbatchSizeNo
pollIntervalMsNo
maxBatchInputCharsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

C2.9/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true, and the description usefully adds concrete behavior beyond them: append-only JSONL checkpoints with named files, bounded retry of 0 or 1, and specific circuit-break triggers (quota/rate-limit, login blockers, provider route mismatch). However, it never explains what the destructive writes actually affect (new files vs overwriting existing checkpoints), how resume decides what to skip, or how long a long-running batch blocks the caller, which is the most important behavioral question for a batch tool.

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?

It is a single dense sentence with no filler, and the action verb ('Execute or resume') is front-loaded along with the object being operated on. The remainder is a comma-separated list of features that packs many clauses together, which costs some readability but nothing is redundant.

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

Completeness2/5

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

For a 17-parameter, nested-object, no-output-schema, destructive batch tool, the description is too thin. It names the checkpoint artifacts (which partially substitutes for an output schema) but leaves the required input contract, the meaning of 'structured' (the schema argument), resume semantics, expected duration, and result retrieval path (presumably zcode_structured_result) unexplained.

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

Parameters2/5

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

With 17 parameters at 0% schema description coverage, the description carries the full burden and mostly fails: it only alludes to maxRetries ('bounded retry (0 or 1)'), itemId ('deterministic item keys'), and provider ('provider route mismatch'). Nothing explains the required task/schema/items contract, the two-value model enum, templateId, domainRule, or the tuning knobs (maxConcurrency, microbatchSize, itemTimeoutMs, capacityWaitMs, pollIntervalMs, maxBatchInputChars, reserveSlots, includeItems).

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

Purpose4/5

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

The description uses a specific verb pair ('Execute or resume') plus a clearly scoped resource ('a low-CPU structured batch with deterministic item keys'), which tells an agent this is the batch/multi-item counterpart to single-run structured tools. It stops short of naming a sibling (e.g. zcode_run_structured or swarm_batch_run), so differentiation has to be inferred from the word 'batch'.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. The word 'resume' implies the same batchId can be re-invoked, and 'circuit breaking on quota/rate-limit' hints at failure handling, but nothing tells the agent how to choose between this, zcode_run_structured, or the swarm_batch_run equivalents, nor what prerequisites (quota, provider, login) must hold before calling.

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