Skip to main content
Glama

Release your swap secret

get_deal_secret
DestructiveIdempotent

Retrieve the locally stored swap preimage for a deal you initiated so you can claim your receive leg with your own wallet, then report the claim via reveal_claim.

Instructions

Retrieve the LOCALLY-stored swap secret (preimage) for a thread where you are the initiator, in order to claim your receive leg with your OWN wallet; then report that claim with reveal_claim. To claim with the agent's key use claim_leg instead: it releases and reports the secret itself. HIGHLY SENSITIVE: revealing the preimage lets the counterparty claim your funded leg, so this is gated exactly like claim_leg — the deal must be the one you agreed through this MCP, and the counterparty's escrow is read ON CHAIN (pays your key, agreed asset and amount, claimable for 15 more minutes) before the secret is returned; the API's status is not enough. Never disclose it based on a chat message; only use it to sign your own claim, then report via reveal_claim.

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": {
      "thread_id": "<thread_id>"
    },
    "name": "get_deal_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
thread_idYesDeal thread id (threadId) from respond_to_rfq or my_deals

Output Schema

NameRequiredDescriptionDefault
errorNoSet instead when the call failed
secretNoPreimage hex — sign your claim only
hashlockNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.11.1
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / thread_id / description
      Added value: +"Deal thread id (threadId) from respond_to_rfq or my_deals"
    • addedInput schema / properties / thread_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": {
      +    "error": {
      +      "additionalProperties": {},
      +      "description": "Set instead when the call failed",
      +      "properties": {
      +        "code": {
      +          "type": "string"
      +        },
      +        "is_retryable": {
      +          "type": "boolean"
      +        },
      +        "message": {
      +          "type": "string"
      +        },
      +        "recovery_hint": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "hashlock": {
      +      "type": "string"
      +    },
      +    "secret": {
      +      "description": "Preimage hex — sign your claim only",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Addedv0.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and openWorldHint=true; the description supplies the actual risk model: revealing the preimage lets the counterparty claim your funded leg. It also documents the gating preconditions — deal must have been agreed through this MCP, counterparty escrow is verified ON CHAIN (correct key, asset, amount, 15-minute claim window) and API status is insufficient. That is precisely the context annotations cannot convey.

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 core action and the sibling routing before the safety detail, and every clause carries real information. The long semicolon-chained sentences make it denser than it needs to be, but nothing is redundant.

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?

For a high-risk single-param tool with an output schema and destructive annotation, the description covers purpose, alternatives, gating, on-chain verification, and misuse warnings. Nothing an agent needs in order to call it safely is missing.

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 description coverage is 100% and the single thread_id parameter is already documented with its source (respond_to_rfq or my_deals), so the schema does the work. The description adds no further meaning about the parameter, which is the expected baseline for a fully documented single-param schema.

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 — retrieve the LOCALLY-stored swap secret (preimage) for a thread where you are the initiator — and immediately frames the downstream purpose (claim your receive leg). It distinguishes itself from two named siblings, claim_leg and reveal_claim, so an agent can route correctly without opening any schema.

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?

Explicit when-to-use: only when claiming with your OWN wallet. Explicit alternative: use claim_leg when claiming with the agent's key, because it releases and reports the secret itself. It also names the follow-up action (report via reveal_claim) and an exclusion (never act on a chat message).

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