Skip to main content
Glama

Accept the deal

accept_terms
Destructive

Accept the current terms at the price you read (currentQuoteAmount from get_thread) — refused if it moved since. Needed only when your side's accepted flag (takerAccepted / makerAccepted) is false: your own quote, or a proposal you sent with your hashlock as the initiator, already counts. When BOTH sides have accepted, the HTLC swap is created. The initiator (funds the long leg) must pass hashlock = sha256(secret): generate a 32-byte secret yourself, keep it safe, and reveal it only when you claim; until then only its hash leaves you. Acting for a person with no wallet here (a chat assistant)? Never make the secret yourself: if they are the initiator, give them the thread's dealUrl to accept there.

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>",
      "quoteAmount": "<quoteAmount>"
    },
    "name": "accept_terms"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThread id
hashlockNo32-byte hex; required from the initiator. Acting for a person with no wallet here (a chat assistant)? Never make the secret: if they are the initiator, send them to the dealUrl to accept there.
quoteAmountYesthe current price, base units

Output Schema

NameRequiredDescriptionDefault
swapNoSet once both accepted
threadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / hashlock / description
      Previous value: -"32-byte hex; required from the initiator"New value: +"32-byte hex; required from the initiator. Acting for a person with no wallet here (a chat assistant)? Never make the secret: if they are the initiator, send them to the dealUrl to accept there."
    • changedOutput schema / properties / swap / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {
      -      "id": {
      -        "description": "Swap id",
      -        "type": "string"
      -      },
      -      "secretCiphertext": {
      -        "description": "Revealed secret, plain hex",
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "status": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "dealUrl": {
      +        "description": "The deal page on the Hashlock site — where a person without a wallet here accepts as initiator, funds and claims",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Swap id",
      +        "type": "string"
      +      },
      +      "secretCiphertext": {
      +        "description": "Revealed secret, plain hex",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "status": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / thread / 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. Changed4 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / id / description
      Added value: +"Thread 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": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "id": {
      +              "description": "Swap id",
      +              "type": "string"
      +            },
      +            "secretCiphertext": {
      +              "description": "Revealed secret, plain hex",
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "status": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Set once both accepted"
      +    },
      +    "thread": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "currentQuoteAmount": {
      +          "description": "Price on the table",
      +          "type": [
      +            "string",
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "id": {
      +          "description": "Thread id",
      +          "type": "string"
      +        },
      +        "makerAccepted": {
      +          "type": "boolean"
      +        },
      +        "pendingAmount": {
      +          "description": "Counter awaiting acceptance",
      +          "type": [
      +            "string",
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "status": {
      +          "type": "string"
      +        },
      +        "takerAccepted": {
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already flag destructive, non-idempotent and open-world, but the description adds behavior beyond them: the price-moved rejection, the consequence of both sides accepting (an HTLC swap is created), and the initiator-only hashlock obligation including secret custody and reveal timing. That is meaningful pre-call context for a destructive, non-idempotent operation.

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-loads the core action and the freshness constraint before the conditional edge cases, and each sentence carries information the agent needs (when to call, side effects, hashlock handling, assistant fallback). The nested parentheticals make it denser than necessary, but no sentence is filler.

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 destructive, non-idempotent, open-world mutation with three parameters and an output schema, the description covers the trigger condition, the failure mode, the resulting state change, and the secret-handling responsibility. Nothing an agent must know before invoking it correctly is missing, and return values are covered by the output schema.

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 schema already defines id, quoteAmount and hashlock; the baseline would be 3. The description goes further by tying quoteAmount to the value read from get_thread and explaining that hashlock is sha256(secret) with a 32-byte secret held by the initiator, but it does not restate the UUID format or the base-unit encoding, so it adds partial rather than complete meaning.

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 ('Accept the current terms') and pins the exact value to accept ('at the price you read (currentQuoteAmount from get_thread)'), plus the guard that it is refused if the price moved. It also distinguishes this from the adjacent accept path by naming the sibling tool and the sibling accepted-flag semantics, so an agent can route correctly 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when the call is needed ('only when your side's accepted flag is false') and when it is not ('your own quote, or a proposal you sent with your hashlock as the initiator, already counts'), and gives a separate instruction path for chat assistants acting for a wallet-less user. Nothing about the decision is left to inference.

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.