Skip to main content
Glama

Repair failed plan step

batch_repair
Idempotent

On user request, replace arguments of a definitively rejected failed step that has no accepted request ID. Supply expected_arguments from batch_get to prevent stale edits. Revalidates the entire plan, preserves completed work, and pauses; use batch_control resume after repair. Never use for uncertain or accepted jobs.

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": {
      "batch_id": "<batch_id>",
      "step_key": "<step_key>",
      "expected_arguments": "<expected_arguments>",
      "arguments": "<arguments>",
      "acknowledge": "<acknowledge>"
    },
    "name": "batch_repair"
  }
}

Input Schema

NameRequiredDescriptionDefault
batch_idYesUUID of the production plan.
step_keyYesKey of the failed step to repair.
argumentsYesComplete replacement arguments for the failed step.
acknowledgeYesConfirm the user authorized repairing this failed step.
expected_argumentsYesCurrent step arguments from batch_get, used to detect concurrent edits.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare non-read-only, idempotent, non-destructive, but say nothing about side effects. The description adds the substantive behavior: it revalidates the entire plan, preserves completed work, and leaves the plan paused, which tells the agent this does not itself complete execution. The stale-edit guard via expected_arguments further explains concurrency behavior beyond the annotations.

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?

Preconditions, required input sourcing, and follow-up action are front-loaded and every clause carries operational meaning. The prose is somewhat dense and run-on, which slightly hurts scannability, but nothing is filler.

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

Completeness4/5

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

For a 5-required-parameter mutation with nested object args, the description covers the precondition, the concurrency guard source, the post-call state (paused plan) and the follow-up tool. It does not indicate what the repair call itself returns (e.g., revalidation outcome), which is a minor gap given there is no output schema.

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% and the schema already explains expected_arguments as a concurrency check drawn from batch_get and acknowledge as user authorization. The description restates those meanings rather than adding format, unit, or edge-case detail, so it sits at the schema-driven baseline.

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 ('replace arguments of a ... failed step') plus a precise precondition ('definitively rejected', 'no accepted request ID'). It also implicitly scopes itself apart from batch_get (source of expected_arguments) and batch_control (resume after repair), so an agent can pick it without opening sibling schemas.

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?

Explicit when-to-use ('on user request'), where the precondition data comes from ('Supply expected_arguments from batch_get'), what to do next ('use batch_control resume after repair'), and a clear exclusion ('Never use for uncertain or accepted jobs'). This is the full when/when-not/alternative triad.

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