Skip to main content
Glama

Repair a failed workflow

repair_workflow
Idempotent

Repair a saved workflow whose run failed. Fetch Hive finds the step that failed, rewrites only that step so the error goes away, checks it, and saves it as a new draft version. The deployed workflow is not changed, and restore_version undoes it. Use it after diagnose_run says the workflow itself is wrong and apply_quick_fixes could not fix it. It does not repair a missing connection, a missing input or a spending limit: the answer then says what the person needs to do. It can take up to a minute: when the answer is not ready the result has a build_id and status building; call get_build with it. Then offer test_run_draft to check the repair.

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": {
      "workflow_id": "<workflow_id>"
    },
    "name": "repair_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNoThe failed run to repair from. Left out: the workflow's latest failed run.
workflow_idYesThe workflow to repair.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say it is a non-read-only, non-destructive, idempotent write; the description adds the crucial blast-radius detail: only the failed step is rewritten, the deployed workflow is untouched, and the result is a new draft version reversible via restore_version. It also discloses the asynchronous profile ('up to a minute') and the exact partial-result shape (build_id and status building) plus the recovery call.

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?

Front-loaded with the action, then scope limits, routing guidance, exceptions, and async handling — no filler sentences. It runs slightly long and dense, but every clause carries information an agent needs.

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?

With no output schema, the description supplies the return-value contract (build_id/status building) and the recommended next call, plus the failure-mode message behavior. Nothing material is missing for an agent to invoke and follow up correctly.

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 both parameters are documented there, including the run_id default of the latest failed run. The description adds no additional meaning about workflow_id or run_id beyond the schema, so the baseline of 3 applies.

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?

Specific verb and resource: 'Repair a saved workflow whose run failed', followed by a concrete mechanism ('finds the step that failed, rewrites only that step... saves it as a new draft version'). It is clearly distinguished from siblings restore_version, diagnose_run, apply_quick_fixes and test_run_draft by name.

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 entry condition: 'Use it after diagnose_run says the workflow itself is wrong and apply_quick_fixes could not fix it.' It also states exclusions (missing connection, missing input, spending limit) and the follow-up path (get_build, then offer test_run_draft), so both when-to-use and when-not-to-use are covered.

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