Skip to main content
Glama

claim_leg

Claims your receive leg of an atomic swap by signing with your agent key and revealing the preimage on-chain, enabling the counterparty to settle the other leg and reporting the claim to the API.

Instructions

AUTONOMOUS SETTLEMENT: claim YOUR receive leg of a swap using the preimage, signing with the agent's own key. This reveals the secret on-chain (so the counterparty/keeper can settle the other leg) and reports the claim to the API. Requires both legs funded and the preimage available (you are the initiator, or the initiator already revealed it). Returns the on-chain tx id.

Input Schema

NameRequiredDescriptionDefault
swap_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly meets it: it discloses the irreversible side effect ('reveals the secret on-chain') and the downstream consequence (counterparty/keeper can settle the other leg), plus an API reporting step. It does not cover failure behavior or what happens if the claim tx reverts, but the critical irreversibility is front and center.

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?

Three dense sentences, front-loaded with an ALL-CAPS label and ending with the return value. Every sentence adds information; the shouting is stylistic noise but costs nothing in length.

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 one-parameter settlement action with no annotations and no output schema, the description supplies the return value ('on-chain tx id'), the prerequisites, and the side effect. Only error/revert handling is missing, which an agent would otherwise need.

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 coverage is 0% and there is one undocumented parameter. `swap_id` is self-describing and its uuid format is in the schema, but the description never mentions it or the fact that it is the sole required input. Adequate by implication, not by statement.

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?

States a specific verb and resource ('claim YOUR receive leg of a swap using the preimage') and adds distinguishing scope (signs with the agent's own key, reports to the API). It stops short of naming the obvious sibling `reveal_claim`, so an agent must still infer which of the two settles a leg, but the purpose itself is unambiguous.

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?

Prerequisites are stated explicitly: both legs must be funded and the preimage must be available (you are the initiator or the initiator already revealed it). That is a real gating condition an agent can check. No exclusion is given against `reveal_claim`, which is the one alternative that matters here.

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