Skip to main content
Glama

Set a swap address

set_swap_address
DestructiveIdempotent

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.

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": {
      "id": "<id>",
      "chain": "<chain>",
      "address": "<address>"
    },
    "name": "set_swap_address"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesSwap id
legNoRequired when both legs are on this chain
chainYesChain id from list_assets, e.g. "ethereum", "bitcoin", "tron"
addressYesAn address you control on that chain (Bitcoin: compressed public key hex)

Output Schema

NameRequiredDescriptionDefault
swapNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / swap / properties / dealUrl
      Added value: +{
      +  "description": "The deal page on the Hashlock site — where a person without a wallet here accepts as initiator, funds and claims",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / address / description
      Added value: +"An address you control on that chain (Bitcoin: compressed public key hex)"
    • addedInput schema / properties / chain / description
      Added value: +"Chain id from list_assets, e.g. \"ethereum\", \"bitcoin\", \"tron\""
    • addedInput schema / properties / id / description
      Added value: +"Swap id"
    • addedInput schema / properties / id / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "swap": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "id": {
      +          "description": "Swap id",
      +          "type": "string"
      +        },
      +        "secretCiphertext": {
      +          "description": "Revealed secret, plain hex",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered; the description adds the non-obvious authorization rule that the address must belong to a signed-in session and that a prove_wallet proof made with the API key is rejected. It does not say whether an existing address is overwritten, which is the main remaining behavioral gap for a destructive write.

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 purpose and the funding precondition, with density packed into three sentences that each carry distinct information. Slightly dense in the middle clause about session proofs, but nothing is redundant.

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?

With full schema coverage, an output schema, and annotations, the description needs only the gaps structured fields can't express — ordering and authorization — and it supplies both. Only the overwrite/idempotency consequence of re-calling is left implicit.

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 100%, so the baseline would be 3, but the description adds real meaning beyond the schema: the Bitcoin address must be a compressed pubkey hex, and `leg` encodes maker/taker role (maker funds a, receives on b). That role mapping is not derivable from the enum alone.

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?

The description gives a specific verb and resource ('Set your receive/refund address for a swap leg') rather than restating the title, and it disambiguates the on-chain vs. same-chain case. An agent can tell exactly what state is being written without opening the 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?

It states a concrete precondition ('Required before funding') and a conditional trigger for the optional parameter ('When BOTH legs are on the same chain, pass `leg`'). It falls short of naming a direct alternative, though it does point at prove_wallet as the proof path that must already exist.

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.