Skip to main content
Glama

xchain_build_refund

Destructive

[STATE] Build the unsigned EVM refund transaction to reclaim your stake on the EVM leg of a cross-chain match. Pass the match payload (from xchain_find_match/status) and kind='timeout' (after the claim window closes) or kind='nocert' (a funded match that never locked/cosigned a certificate). Refund is permissionless — you pay only gas. Returns {to, data, value_wei, chain} to sign and submit with your EVM wallet. EVM-leg only.

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": {
      "match": "<match>"
    },
    "name": "xchain_build_refund"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNo"timeout" (default) or "nocert".
matchYesThe `match` payload object from xchain_find_match / xchain_match_status.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare a mutating, non-idempotent, open-world operation, and the description adds the crucial qualifier that this only builds an unsigned transaction to be signed and submitted externally, so the tool itself does not broadcast. It also discloses that refund is permissionless and costs only gas, which is meaningful behavioral context beyond the hints. It does not cover failure modes such as what happens if the window is still open or the match is ineligible.

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 and the outcome, followed by parameter guidance, cost model, and return shape in a tight sequence with no filler sentences. The only noise is the unexplained '[STATE]' prefix tag.

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?

There is no output schema, but the description compensates by naming the returned fields ({to, data, value_wei, chain}) and stating they must be signed and submitted with an EVM wallet. For a two-parameter build tool, everything needed to call it correctly and use the result is present.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: it explains the provenance of the `match` object (from xchain_find_match/status) and semantically defines both `kind` values with the condition under which each applies. This is meaning the schema does not carry.

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 artifact ('Build the unsigned EVM refund transaction') plus the exact goal ('reclaim your stake on the EVM leg of a cross-chain match'). The closing 'EVM-leg only' scopes it against the xmatch sibling, so an agent can distinguish the two without opening either schema.

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?

Gives explicit preconditions for each mode: kind='timeout' only after the claim window closes, kind='nocert' only for a funded match that never locked/cosigned a certificate, and points to xchain_find_match/status as the source of the match payload. It does not name xchain_build_refund_xmatch as the alternative for the non-EVM leg, leaving that inference to the 'EVM-leg only' clause.

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