Skip to main content
Glama

set_swap_address

Set your receive/refund address for a swap leg (Bitcoin: the compressed pubkey hex). Required before funding. An address that receives money must be one this account signed in with, or proved from a signed-in web session — a prove_wallet proof made with the API key does not count. When BOTH legs are on the same chain, pass leg ("a" or "b") — the maker funds leg a and receives on leg b, the taker the reverse.

Input Schema

NameRequiredDescriptionDefault
idYes
legNoRequired when both legs are on this chain
chainYes
addressYes

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.5/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 burden and does well: it discloses the authorization constraint (address must be one signed in with or proved from a signed-in web session), the ordering requirement before funding, and the maker/taker leg mapping. It does not say whether setting an address again replaces a prior one or how failures surface, so it falls short of full behavioral disclosure.

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?

The core action and its prerequisite are front-loaded, and every sentence carries operative information (format, auth rule, leg rule). The auth sentence is dense and slightly convoluted, but no sentence is filler.

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 4-parameter mutation tool with no annotations and no output schema, the description covers the auth model, sequencing, and leg roles well. It stops short of explaining what `id` refers to or whether the address can be changed after it is set, which an agent would want to know.

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 only 25%, so the description must compensate and largely does: it defines `address` format per chain and explains `leg` semantics (maker funds a, receives on b; taker the reverse) beyond the schema's terse 'Required when both legs are on this chain'. `id` and `chain` remain undefined in both places, leaving one real gap.

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 resource — set the receive/refund address for a swap leg — and immediately clarifies the Bitcoin format (compressed pubkey hex). It is clearly distinguishable from siblings like prove_wallet and build_fund, which it references by contrast.

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?

Explicitly says it is 'Required before funding', names the auth exclusion (a prove_wallet proof made with the API key does not count), and gives the conditional rule for passing `leg` when both legs share a chain. When-to-use, when-not, and the alternative are all present.

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.