Skip to main content
Glama

build_refund

Build the UNSIGNED refund for a leg (available after its timelock expires). Same signing shapes as build_claim; for Bitcoin, omit preimageHex when broadcasting so the refund branch is taken.

Input Schema

NameRequiredDescriptionDefault
idYes
legYes

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations the description carries the full load, and it does disclose meaningful behavior: the output is UNSIGNED (not broadcastable as-is), it is gated on timelock expiry, and for Bitcoin preimageHex must be omitted at broadcast time to select the refund branch — a non-obvious, high-consequence detail. It omits what happens if called early (error semantics) and what the returned artifact actually is.

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?

Two sentences, front-loaded with the core action and the gating condition, with no filler. Every clause carries operational information, including the branch-selection warning.

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?

No annotations and no output schema means the description is the only documentation, and for a build step in a build/sign/broadcast pipeline it should at least name the artifact produced and the hand-off to broadcast_tx. As written an agent knows the preconditions and the Bitcoin quirk but not what it gets back.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate and largely does not. It references 'leg' and 'its timelock' but never says what the `id` refers to (RFQ, swap, or thread) nor explains the 'a'/'b' leg distinction, leaving both parameters semantically opaque.

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 description states a specific verb and resource ('Build the UNSIGNED refund for a leg') and positions it relative to the sibling build_claim by sharing signing shapes. It is clear this is a construction step for a refund transaction rather than a broadcast, though the domain concept of a 'refund' is not defined for an unfamiliar agent.

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?

It gives a concrete precondition — 'available after its timelock expires' — and points to build_claim as the analogue for signing shapes, which tells the agent where this fits in the flow. It stops short of stating what the alternative is when the timelock has not expired or whether a claim should be used instead.

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.