Skip to main content
Glama

run_recover

Destructive

Recover your own active task run after its lease expires: issue a new lease, cancel lingering running executions, and record the reason in task history. Use force only if the prior holder is gone.

Instructions

Take back your own active run of a task after its lease expired, for example after the session was interrupted for longer than the lease. It issues a new lease to you, cancels the run's executions still marked as running, and records the reason in the task history. Only the actor who owns the lease can recover it. While the lease is still valid this fails; pass force=true only when you know the previous holder of your lease is gone. To simply continue your own run, call task_start with the task_id instead.

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": {
      "run_id": "<run_id>",
      "reason": "<reason>"
    },
    "name": "run_recover"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoRecover even though the lease has not expired yet. Use only when the previous session holding your lease is certainly gone.
reasonYesWhy the run is recovered; recorded in the task history.
run_idYesCanonical UUIDv7 of the active run to recover, as returned by task_start or task_show.

Output Schema

NameRequiredDescriptionDefault
runNo
errorNo
snapshotNo
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.5
    • addedInput schema / properties / force / description
      Added value: +"Recover even though the lease has not expired yet. Use only when the previous session holding your lease is certainly gone."
    • addedInput schema / properties / reason / description
      Added value: +"Why the run is recovered; recorded in the task history."
    • addedInput schema / properties / run_id / description
      Added value: +"Canonical UUIDv7 of the active run to recover, as returned by task_start or task_show."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only say destructiveHint=true and non-idempotent; the description supplies the specifics an agent needs: it issues a new lease, cancels executions still marked running, and writes the reason into task history. It also discloses the authorization constraint (only the lease owner can recover) and the precondition that failure occurs while the lease is valid, which is more than the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action and scope are front-loaded in the first sentence, followed by effects, constraints, and finally the alternative. Every sentence carries distinct information; the interruption example clarifies the expiry condition rather than padding the text.

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 destructive, non-idempotent mutation tool this covers the effects, the permission model, the precondition, and the override guard. An output schema exists, so return values need not be described.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning by framing force as tied to the lease-still-valid failure path and by tying reason to the task history record. It stops short of adding format or identifier guidance for run_id, which the schema already covers.

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 names a specific verb and resource ('Take back your own active run of a task after its lease expired') and scopes it to the caller's own run. It is clearly distinguished from the sibling it could be confused with, task_start, and states the ownership precondition directly.

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?

It gives an explicit trigger (lease expired, session interrupted), an explicit failure condition ('While the lease is still valid this fails'), a guarded override (force=true only when the previous holder is gone), and a named alternative ('call task_start with the task_id instead'). The agent has no inference left to make about when to pick this tool.

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