Skip to main content
Glama

negotiate

Act in a deal thread: send messages, propose or accept prices, accept the deal, or reject it. Accepting names the price so any change since you read it is refused.

Instructions

Act in a deal thread. Actions:

  • message: free-text chat (body required)

  • propose: counter with a new TOTAL price (price required). Proposing a price is agreeing to it: when the counterparty takes it, the deal is agreed.

  • accept_proposal: take the price the counterparty proposed (price required: the pendingPrice shown by deal_status or my_deals) — they agreed to it by proposing, so this agrees the deal. As with accept, the initiator's secret is generated locally and only its hashlock is sent.

  • accept: accept the price on the table (price required: the currentPrice shown by deal_status or my_deals) — needed only when youAccepted is false — your own quote or proposal normally already counts (except an initiator's on an older server). When both sides have accepted, the HTLC swap is created. If you are the initiator (fund the long leg), a swap secret is generated LOCALLY on this machine and only its sha256 hashlock is sent — retrieve it later with get_deal_secret.

  • reject: decline and close the deal Accepting names the price on purpose: if it changed since you read the deal, the accept is refused — read it again and decide.

Input Schema

NameRequiredDescriptionDefault
bodyNomessage text (action=message)
priceNototal price: the new one (propose) or the one you are accepting (accept_proposal, accept)
actionYes
thread_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.4/5.0
Behavior5/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 so well: it explains that propose/accept_proposal constitute agreement, that accept triggers HTLC creation, and that the initiator's secret is generated locally with only its hashlock sent, retrievable via get_deal_secret. It also discloses that a stale price causes refusal and that reject closes the deal.

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 bullet-list structure is front-loaded and appropriate for a five-action tool, with no filler sentences. Some clauses are long and nested, especially around accept and hashlock handling, but every part conveys useful semantics.

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 complex mutation tool with no annotations or output schema, the description covers action semantics, side effects, and secret handling thoroughly. It could go further by explaining the response after each action or explicitly telling the agent where to obtain thread_id, so it is strong but not fully self-contained.

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

Parameters5/5

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

Schema descriptions cover only body and price minimally, and action/thread_id have no descriptions. The description compensates by mapping body to message and price to the exact price required for propose, accept_proposal, and accept, including the source (pendingPrice/currentPrice). That adds substantial meaning beyond the schema.

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 opens with 'Act in a deal thread' and enumerates five concrete actions, so the tool's scope is clear. It references deal_status and my_deals as sources of pricing state, indirectly separating negotiation writes from status reads, though it does not explicitly name every sibling it is not.

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 precise conditions for selecting accept vs accept_proposal vs propose, including that accept is only needed when youAccepted is false and that accept_proposal uses pendingPrice. It also tells the agent to re-read the deal if the named price has changed. It stops short of stating when to use negotiate versus RFQ tools like respond_to_rfq.

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