Skip to main content
Glama

tool_chain

Runs 1-8 MCP tool calls sequentially across internal, hot, or cold groups, returns per-step receipts, and halts or continues on failure after pre-run policy checks.

Instructions

Run 1-8 tool calls sequentially across groups (internal, hot or cold ":") and return a receipt per step (judged: exception | mcp-isError | exit-code | error-prefix | ok). on_error "halt" (default) stops at the first failure; there is NO automatic rollback. All steps are policy-checked before any runs (chain_policy, chain_forbidden, deny_tools). background=true returns a chain_id for chain_job. strip_images (default true) saves images to spool files.

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": {
      "steps": "<steps>"
    },
    "name": "tool_chain"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYes
on_errorNohalt
backgroundNo
strip_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations supply only readOnlyHint=false, so the description carries the real burden and does: it discloses receipts judged as exception/mcp-isError/exit-code/error-prefix/ok, the absence of automatic rollback, and that all steps are policy-checked (chain_policy, chain_forbidden, deny_tools) before any run. That last point is critical — a failing step four does not undo steps one through three, and the agent is told so explicitly.

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 front-loaded with the action and then packs in the return format, failure semantics, policy pre-check, and two flag behaviors with no filler. The result is dense — several distinct behaviors are compressed into a single block, which costs a little scanning ease but wastes no words.

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 mutation tool with no output schema and no annotation coverage beyond readOnlyHint=false, the description covers what an agent needs: what executes and in what order, what comes back per step, failure and rollback behavior, pre-flight policy checks, and how to go async. Nothing material is left for the agent to discover by trial.

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 reported at 0%, so the description must compensate, and it defines the meaning of every top-level parameter: the 1-8 step limit and name formats for steps, the halt-versus-continue semantics for on_error, the chain_id/chain_job handoff for background, and that strip_images defaults true and writes images to spool files. A 5 is warranted because each parameter's effect on behavior, not just its type, is stated.

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?

The description opens with a specific verb and resource: 'Run 1-8 tool calls sequentially across groups', and names the accepted name forms (internal flat, hot, "<group>:<tool>"). It goes on to state the return shape (a receipt per step) and the background variant, so an agent can tell this apart from chain_job or hub_exec without opening a schema.

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?

It gives clear conditions for the key mode switches: on_error "halt" is the default and stops at the first failure, and background=true returns a chain_id 'for chain_job', explicitly routing follow-up work to that sibling. It does not say when to use a chain at all versus calling apply_edits or hub_exec directly, which keeps it below a 5.

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