Skip to main content
Glama

contract recovery

contract_recovery
Destructive

Read, configure, invoke, or kill unattended recovery for a saved contract. Recovery automatically accepts and resumes the pipeline only when every blocking machine check of the saved contract passes; otherwise it waits for buyer approval. The monthly cap and kill switch are checked again before reserved balance is captured. read: GET /v1/contracts/{id}/recover. configure: PUT /v1/contracts/{id}/recover; body: enabled, monthly_cap_usd, callback_url. recover: POST /v1/contracts/{id}/recover; body: failed_input, budget_usd, idempotency_key. kill: DELETE /v1/contracts/{id}/recover. failed_input: GET /v1/bounties/{id}/recovery-input.

Input Schema

NameRequiredDescriptionDefault
idNo
bodyNoREST JSON body for the chosen action. See its documented fields in the action description and OpenAPI.
tokenNo
actionYes
handleNo
agent_keyNo
wanted_idNo
transfer_idNo
idempotency_keyNo
delete_credentialNo
payment_signatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / description
      Added value: +"Required by action: read: id and agent_key; configure: id, agent_key and body; recover: id, agent_key and body; kill: id and agent_key; failed_input: id and agent_key."
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "read"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "agent_key"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "configure"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "agent_key",
      -      "body"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "recover"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "agent_key",
      -      "body"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "kill"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "agent_key"
      -    ]
      -  },
      -  {
      -    "properties": {
      -      "action": {
      -        "const": "failed_input"
      -      }
      -    },
      -    "required": [
      -      "action",
      -      "id",
      -      "agent_key"
      -    ]
      -  }
      -]
  2. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint and openWorld, so the description's job is to add specifics — and it does: the auto-accept gating rule, re-checking of the monthly cap and kill switch before reserved balance is captured, and per-action idempotency_key in the recover body. It stops short of saying what kill/delete actually destroys (the saved recovery config? the reserved funds?) or whether recover is retry-safe.

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 what the tool does and its behavioral rule, then a compact action→endpoint→body listing that wastes no words. The terse endpoint notation is dense but scannable; a sentence introducing the action list would have made the structure slightly cleaner.

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

Completeness3/5

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

For an 11-parameter, multi-action, nested-body tool with no output schema, the description covers action routing and body fields but omits the return shape of read (what a recovery config looks like) and the auth/credential semantics of the shared token/agent_key/delete_credential parameters. Adequate to invoke the common paths, not complete for the full surface.

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 description coverage is only 9%, so the description must compensate, and it does for the decision-critical parts: it names the body fields for configure (enabled, monthly_cap_usd, callback_url) and recover (failed_input, budget_usd, idempotency_key), and the schema's own description lists required params per action. It leaves roughly half the parameters (token, handle, wanted_id, transfer_id, delete_credential, payment_signature) unexplained, though several appear irrelevant to these actions.

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 first sentence names the resource (unattended recovery for a saved contract) and enumerates the operations (read/configure/invoke/kill), then maps each to a concrete REST endpoint, so an agent can see exactly what the tool covers. Minor friction: the prose says "invoke" while the enum uses "recover", and it never differentiates itself from the sibling contract_rerun.

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

Usage Guidelines3/5

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

It states the substantive condition governing recovery behavior (auto-accept only when every blocking machine check passes, otherwise wait for buyer approval), which tells an agent what outcome to expect. But it gives no routing guidance: no statement of when to choose this over contract_rerun, unattended_policy, or pay_link, and no prerequisites such as agent_key authorization being required for every action.

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