hashlock-mcp
OfficialThis server enables AI agents and users to perform trustless, cross-chain OTC atomic swaps (HTLC-based) on Ethereum, Bitcoin, and Sui — covering the full lifecycle from price discovery to settlement.
Create & Manage RFQs (create_rfq): Broadcast a Request for Quote for an OTC swap to market makers via a sealed-bid auction, with optional Ghost Auction (anonymous) mode. Supports mainnet and testnets.
One-call Swap Facade (swap_quote / swap_status / swap_execute / swap_cancel): Simplified swap flow — open a sealed auction, wait for bids, execute against the best bid with a price guard, or cancel. Designed for a "just swap X for Y" experience.
Market-Making (respond_rfq, list_open_rfqs): List open RFQs and submit sealed-bid quotes. No funds are locked until a requester accepts.
HTLC Funding (create_htlc): Record an on-chain HTLC lock transaction (EVM, Bitcoin P2WSH, or Sui Move) to advance the atomic settlement state machine.
Claim (withdraw_htlc): Reveal the preimage to atomically claim both legs of a cross-chain swap — trustless, no intermediary.
Refund (refund_htlc): Recover locked funds after the timelock expires if the swap did not complete.
HTLC Status (get_htlc): Query real-time per-leg settlement state (lock status, timelock, preimage, roles) to determine the next action.
Trade History (list_my_trades): List active and historical trades with optional status filtering — useful for rebuilding agent state after context loss.
Supported Pairs (list_supported_pairs): Discover all chain-qualified token pairs available for trading.
Supported chains: Ethereum mainnet/Sepolia, Bitcoin mainnet/signet, Sui mainnet/testnet. Tokens: ETH, BTC, SUI, USDC, USDT, WBTC, WETH.
Allows creation and settlement of atomic swaps on the Bitcoin network using Hashlock's intent-based trading protocol, supporting RFQs and HTLC operations.
Enables cross-chain atomic swaps on Ethereum through RFQ creation, market making, and HTLC funding/withdrawal/refund operations.
Facilitates atomic swaps on the Sui blockchain with tools for RFQ management and HTLC lifecycle operations via Move-based contracts.
@hashlock-tech/mcp
Hashlock Markets — the settlement layer for the agent economy, as MCP tools. Non-custodial cross-chain OTC: sealed RFQ + price negotiation + HTLC atomic settlement — both legs settle or both refund; no bridge, no custodian, no counterparty risk. BTC ↔ EVM / TRON.
⚠️ Testnets only for now (Ethereum Sepolia · TRON Nile · Bitcoin signet). Mainnet comes after the security-hardening gate — do not send real funds.
What is this?
The canonical Model Context Protocol server for Hashlock Markets. It gives AI agents (Claude, Cursor, Windsurf, any MCP client) the full OTC trading loop:
Browse the asset registry and the public RFQ board
Post a public RFQ or a private fixed-price order (shareable link)
Respond to requests with a price; negotiate (counter / accept / decline) in the deal thread
Agree — both parties accept → an HTLC swap is created
Track settlement — who funded, timelocks, tx hashes — and manage receive/refund addresses
Settlement signing (funding and claiming the HTLCs) stays with your own wallet — the server never holds keys or funds. The swap secret is generated locally on your machine and only its sha256 hashlock is sent; retrieve it with get_deal_secret when it's time to claim.
Related MCP server: hashlock-mcp-server
Two ways to run
Local (stdio) — the npm package below. You run it on your machine with your own keys; it can settle autonomously (SIWE login + on-chain signing with
HASHLOCK_*_KEY). Full trust in yourself.Remote (hosted, Streamable HTTP) — a public URL (
https://dev.hashlock.markets/mcp) anyone can add from Claude / ChatGPT / any MCP client; one-click OAuth, no install. Multi-tenant, so it is strictly non-custodial: settlement returns unsigned transactions you sign with your own wallet, and the server never holds keys or your swap preimage. See Remote (hosted) below.
Install
Local stdio via npx (Claude Desktop / Cursor / Windsurf mcpServers config):
{
"mcpServers": {
"hashlock": {
"command": "npx",
"args": ["-y", "@hashlock-tech/mcp"],
"env": {
"HASHLOCK_EVM_KEY": "0x<agent EVM key (TESTNET!)>",
"HASHLOCK_TRON_KEY": "<agent TRON key, 64-hex (optional)>",
"HASHLOCK_BTC_KEY": "<agent BTC WIF, signet (optional)>"
}
}
}
}Auth — autonomous, per chain
The agent owns its key(s); the server does the login itself (nonce → sign → JWT, refreshed on expiry). The first configured key (EVM → TRON → BTC) mints the session; each key also signs settlement on its chain.
Env var | Chain | Login |
| EVM | SIWE |
| TRON |
|
| Bitcoin | BIP-322 |
| — | a ready JWT (alternative to a key) |
With none set, read-only tools (list_assets, list_open_rfqs, get_rfq) still work. Use dedicated testnet keys.
Other env: HASHLOCK_API_URL (default https://dev.hashlock.markets/api), HASHLOCK_APP_URL (share links; default derived), HASHLOCK_EVM_RPC (default a public Sepolia RPC), HASHLOCK_TRON_HOST (default Nile), HASHLOCK_SECRETS_PATH (default ~/.hashlock/mcp-secrets.json, mode 0600).
Remote (hosted)
The same server also runs as a remote MCP over Streamable HTTP so anyone can connect by URL — no
install. This is the multi-tenant, non-custodial surface: browse, RFQ, negotiate, and get unsigned
fund/claim/refund transactions you sign with your own wallet (there is no autonomous key-in-env signing
and no server-side secret storage here — you supply your own hashlock and keep your own preimage).
Connect from a client: add the server URL. Nothing else — the client discovers that it needs authorization, sends you to Hashlock to sign in and approve, and receives its own key:
URL: https://dev.hashlock.markets/mcpThe grant then appears under Developers as an ordinary API key
and can be revoked there at any time. Clients that do not speak OAuth can still send a key they created
themselves as Authorization: Bearer hk_….
Standard OAuth 2.1, so any compliant MCP client drives it unattended:
Step | Endpoint |
Unauthorized call names its metadata |
|
Client reads the resource + server metadata |
|
Client registers itself |
|
You sign in and approve, in the browser |
|
Client redeems the code for a key |
|
Codes are single-use and expire in 60 seconds; redirect URIs are allowlisted, with loopback permitted per RFC 8252. The issued token IS the API key, so a grant is revocable from the same list as every other key.
Testnets only until the hardening gate.
Run the hosted service yourself:
docker build -t hashlock-mcp-http .
docker run -p 8080:8080 -e HASHLOCK_V1_URL=https://api-dev.hashlock.markets/v1 hashlock-mcp-http
# or, from source:
pnpm build && HASHLOCK_V1_URL=https://api-dev.hashlock.markets/v1 PORT=8080 pnpm start:httpEnv: HASHLOCK_V1_URL (developer-API base, default https://api.hashlock.markets/v1) · PORT (default
8080). Put it behind your reverse proxy at /mcp; GET /health is a liveness probe.
Tools (16)
Tool | What it does |
| Asset registry ( |
| Public RFQ board, filterable |
| One RFQ / private order |
| Post a public RFQ or private fixed-price order |
| Cancel your own request |
| Respond with a price → opens a deal thread |
|
|
| Your requests and deal threads |
| Thread + negotiation history + HTLC swap state |
| Your receive/refund address per chain |
| The locally-stored swap preimage (gated on both legs funded) |
| Report an out-of-band claim (secret + tx) so the other leg settles |
| The account you're authenticated as |
| Autonomous: fund your side of a swap on-chain with the agent's own key (EVM/TRON/BTC) |
| Autonomous: claim your receive leg with the preimage (reveals the secret on-chain) |
Amounts are human decimal strings ("0.5"); prices are the total quote-asset amount, not per-unit. Errors return a structured envelope { error: { code, is_retryable, recovery_hint } } agents can branch on.
Fully autonomous loop
With a key set for each chain a swap touches, an agent can run end to end with no human:
create_rfq/respond_to_rfq → negotiate (accept) → set_settlement_address (both chains) →
fund_leg → claim_leg. Funding/claiming is signed locally with the agent's keys; the swap secret is
generated + stored locally and only its hashlock leaves the machine. Use dedicated testnet keys.
How atomic settlement works
Both parties lock funds in HTLCs bound to the same sha256(secret) hashlock — BTC as a P2WSH script, EVM/TRON as contracts. The initiator funds the long-timelock leg first (asymmetric timelocks, so nobody gets a free option). Claiming one leg reveals the secret on-chain, which unlocks the other leg. Either both legs settle, or both refund after their timelocks. The recipient of each leg is fixed at funding time — revealing the secret cannot redirect funds.
Development
pnpm install
pnpm run build # tsup → dist/
pnpm run lint # tsc --noEmit
pnpm test # vitestNode ≥ 20. MIT.
Available Tools
13 toolscreate_htlcA
Trustless atomic settlement — delivery vs payment (DVP) guarantee. Both sides receive their asset OR both get refunded; zero counterparty risk, zero slippage, no custodian. Records the on-chain HTLC lock tx hash to advance the settlement state machine.
USE WHEN: a trade is accepted and the user has just broadcast the lock transaction on-chain (EVM, Bitcoin, or Sui). DO NOT USE WHEN: the trade is not yet accepted, or the lock tx has not been broadcast yet — submit the on-chain tx first, then call this tool.
PARAM NOTES: role must be INITIATOR (you locked first) or COUNTERPARTY (you locked in response). txHash must be 0x-prefixed. chainType defaults to evm — set "bitcoin" or "sui" for non-EVM legs.
| Name | Required | Description | Default |
|---|---|---|---|
| tradeId | Yes | Trade ID from an accepted trade | |
| txHash | Yes | On-chain transaction hash of the HTLC lock (0x-prefixed) | |
| role | Yes | Your role in the trade | |
| timelock | No | HTLC expiry as Unix timestamp | |
| hashlock | No | SHA-256 hashlock (0x-prefixed hex) | |
| chainType | No | Chain type: evm, bitcoin, or sui | |
| preimage | No | Secret preimage (only for initiator) | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description mentions idempotency via client_request_id but does not detail side effects, error states, or what happens on failure. The tool's impact on state machine is implied but not fully explained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise and well-structured: main purpose, usage guidance, then parameter notes. No redundant information, each sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema. Description explains purpose and param notes but lacks details on return value, error handling, or how this tool fits into the overall trade lifecycle. Could be more complete for a complex settlement tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. Description adds value with notes on role requirements, txHash format, and chainType defaults, clarifying usage beyond schema definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool's purpose: recording the on-chain HTLC lock tx hash to advance settlement, with DVP guarantee. Differentiates from siblings like refund_htlc and withdraw_htlc by focusing on the lock step.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit USE WHEN and DO NOT USE WHEN conditions, specifying the prerequisite (trade accepted, lock tx broadcast). Provides clear context for correct invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_rfqA
Trustless price discovery for OTC trades — sealed-bid auction with zero information leakage, no front-running, no MEV. Non-custodial, cross-chain (ETH/BTC/SUI). Agent-friendly: works with any MCP runtime.
Create a Request for Quote (RFQ) for an OTC swap — broadcast to market makers for sealed-bid quotes.
USE WHEN: user wants competitive quotes (not AMM curve fill) for size ≥ $10k, cross-chain swaps, privacy-sensitive orders, or expressed a "negotiate" / "best execution" / "large block" / "institutional" intent. DO NOT USE WHEN: sub-second execution is required, or pair is a long-tail memecoin with no market-maker coverage (prefer DEX aggregator).
═══ SUPPORTED CHAIN-QUALIFIED PAIRS ═══ ETH/sepolia, ETH/ethereum, BTC/bitcoin-signet, BTC/bitcoin, USDC/sepolia, USDC/ethereum, USDT/ethereum, WBTC/ethereum, WETH/ethereum, SUI/sui, SUI/sui-testnet. Cross-chain RFQs (e.g. SUI/sui ↔ ETH/sepolia) are first-class — set baseChain and quoteChain explicitly so the backend can disambiguate same-symbol-different-chain pairs.
═══ INTENT → PARAMS MAPPING ═══ Translate the user free-text intent into params using these rules. The user will rarely give a structured form; you are the compiler.
side: • "sell X / swap X for Y / exchange X to Y / liquidate X / convert X to Y / cash out X" → side=SELL, baseToken=X, quoteToken=Y • "buy X with Y / acquire X / pay Y for X / get X using Y" → side=BUY, baseToken=X, quoteToken=Y • Turkish: "sat / çıkar / boşalt" → SELL, "al / topla" → BUY, "X karşılığı Y" → SELL with X=base.
baseChain / quoteChain (CHAIN INFERENCE): • If the user names the chain explicitly ("Sepolia", "mainnet", "Sui testnet", "signet"), use it. • Otherwise apply per-token mainnet defaults: ETH/USDC/USDT/WBTC/WETH → "ethereum"; BTC → "bitcoin"; SUI → "sui". • If the user says "test" / "testnet" / "demo" / "test mode" / "sınama" globally, switch every leg to its testnet variant: ETH→sepolia, BTC→bitcoin-signet, SUI→sui-testnet, USDC→sepolia. • Cross-environment is allowed and common — if only ONE leg is qualified with a testnet hint (e.g. "sell SUI for Sepolia ETH"), keep the other leg on its mainnet default. Do NOT silently testnet-ify the unqualified leg. • If the chain is genuinely ambiguous after all rules (e.g. "sell ETH for USDC" — both could be mainnet or both Sepolia depending on user intent), ASK before calling. Do not gamble on real funds.
amount: • Pass the raw decimal string the user typed ("0.1", "1.5", "10"). Do NOT pre-convert to wei / satoshis / smallest unit — the backend handles decimals via the token registry. • If the user gives a USD-denominated value ("worth $10k of SUI"), do NOT call the tool — ask for the base-token amount or compute and confirm before submitting.
expiresIn (seconds): • Default 300 (5 min) when unspecified. • "Quick / urgent / hızlı / acele" → 60–120. • "Leave open / take your time / uzun süre" → 600–1800. • Hard cap 86400 (24 h).
isBlind (Ghost Auction mode): • Default false. Zero slippage: quote equals fill, regardless of mode. • Set true on intent words: "ghost", "blind", "anonymous", "hide identity", "private auction", "gizli", "kimliğimi gizle".
═══ REQUIRED BEFORE CALLING ═══
RESTATE the resolved deal in plain language back to the user, naming the chain on every leg ("SELL 0.1 SUI on Sui mainnet for ETH on Sepolia, public auction, expires in 5 min — confirm?"). Real funds. Do NOT submit on first inference unless the user has already explicitly accepted the structured form.
If you cannot resolve a leg's chain confidently, ASK ("Ethereum mainnet ETH or Sepolia testnet ETH?"). Never silently default when the user phrasing is ambiguous on chain.
If the user names a token outside the supported list, do NOT call this tool — explain and offer the closest supported pair.
═══ EXAMPLES ═══ User: "Hashlock'ta 0.1 SUI'mi Sepolia ETH'e karşı sat, 5 dakika" → { side: "SELL", baseToken: "SUI", baseChain: "sui", quoteToken: "ETH", quoteChain: "sepolia", amount: "0.1", expiresIn: 300, isBlind: false }
User: "sell 2 ETH for USDC, ghost auction" → { side: "SELL", baseToken: "ETH", baseChain: "ethereum", quoteToken: "USDC", quoteChain: "ethereum", amount: "2", isBlind: true }
User: "buy 0.05 BTC with USDT, take your time" → { side: "BUY", baseToken: "BTC", baseChain: "bitcoin", quoteToken: "USDT", quoteChain: "ethereum", amount: "0.05", expiresIn: 1200 }
User: "test mode — swap 1 SUI to ETH" → { side: "SELL", baseToken: "SUI", baseChain: "sui-testnet", quoteToken: "ETH", quoteChain: "sepolia", amount: "1" }
| Name | Required | Description | Default |
|---|---|---|---|
| baseToken | Yes | Base asset symbol from the supported list (ETH, BTC, SUI, USDC, USDT, WBTC, WETH). Case-insensitive but uppercase preferred. | |
| baseChain | No | Chain the base token settles on. Inference defaults: ETH/USDC/USDT/WBTC/WETH→"ethereum", BTC→"bitcoin", SUI→"sui". Override to testnet ONLY on explicit user mention ("sepolia", "signet", "testnet", "test", "sınama"). Required for SUI legs (no legacy fallback). | |
| quoteToken | Yes | Quote asset symbol from the supported list. Same rules as baseToken. | |
| quoteChain | No | Chain the quote token settles on. Same inference rules as baseChain. Cross-environment pairs are allowed (e.g. baseChain="sui" + quoteChain="sepolia"). | |
| side | Yes | BUY = user wants to acquire baseToken; SELL = user wants to dispose of baseToken. Map "sell/swap/exchange/liquidate/convert/sat" → SELL, "buy/acquire/al" → BUY. | |
| amount | Yes | Amount of base token as a raw decimal string ("0.1", "1.5", "10"). Do NOT convert to wei/satoshis. Reject USD-denominated values — ask user for base-token amount instead. | |
| expiresIn | No | RFQ expiration in seconds. Default 300 (5 min). "Urgent" → 60-120. "Take your time" → 600-1800. Hard cap 86400 (24 h). | |
| isBlind | No | Ghost Auction mode — hides requester identity from bidders and losing counterparties. Default false. Set true on intent words: "ghost", "blind", "anonymous", "hide identity", "gizli". External brand: "Ghost Auction"; internal name retained for API/DB schema stability. | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses behavioral aspects: sealed-bid auction, non-custodial nature, cross-chain support, zero slippage, and pre-call steps. It also covers idempotency and the requirement to confirm before calling, ensuring the agent understands the tool's behavior comprehensively.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear headings, examples, and logical flow. It is detailed but every section adds essential information for proper tool usage. The front-loading of the core purpose and the use of tables and examples make it efficient for an AI agent to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the detailed description, it lacks an explanation of the tool's return value. There is no output schema, and the description does not mention what the response contains (e.g., RFQ ID, status). For a complex tool with no output schema, this omission creates a completeness gap, though the rest of the context is thorough.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds immense value beyond the input schema, with detailed intent mapping, chain inference, language-specific instructions, handling of edge cases like USD amounts, and explanations for each parameter. This helps the agent correctly populate parameters even from ambiguous user input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: creating an RFQ for OTC swaps. It specifies the type of auction (sealed-bid), distinguishes from siblings like swap_execute, and provides explicit use and non-use cases, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides comprehensive usage guidelines, including explicit 'USE WHEN' and 'DO NOT USE WHEN' sections, alternatives like DEX aggregator, and detailed intent-to-parameter mapping with language support and chain inference rules. It also instructs when to ask for clarification, ensuring proper tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_htlcA
Real-time trade observability — per-leg HTLC settlement state for a trade: which legs are locked, on which chain, with what timelock, and whether the preimage has been revealed. Read-only, safe to call at any time.
Returns an ARRAY of HTLC legs (one entry per locked leg, typically the initiator leg and the counterparty leg). An empty array means no HTLC has been recorded for this tradeId yet (or the tradeId does not exist) — treat empty as "nothing locked", not an error.
USE WHEN: showing trade/settlement status to the user, deciding the next settlement action (lock / claim / refund), polling for the counterparty leg, or rebuilding state after losing context. DO NOT USE WHEN: you need RFQ/quote status (this is settlement-leg state only) — use list_my_trades or list_open_rfqs instead.
INTERPRETING THE RESULT (per leg): role = INITIATOR | COUNTERPARTY; status = leg lifecycle; chainType = evm | bitcoin | sui; timelock = unix expiry of that leg; preimage non-null on a claimed initiator leg. Both legs ACTIVE = swap can complete (claim path). Initiator leg past timelock with counterparty leg absent = refund path.
| Name | Required | Description | Default |
|---|---|---|---|
| tradeId | Yes | Trade ID to query HTLC legs for. An unknown ID returns an empty array, not an error. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses read-only nature and safety to call anytime. Explains empty array behavior for unknown tradeId (not an error), and details the structure and interpretation of the result array. Since no annotations exist, the description carries the full burden and excels.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured into sections (purpose, returns, usage, interpretation). Some verbosity in the interpretation section, but every sentence adds value. Front-loaded key info effectively.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Highly complete: covers purpose, return format, edge cases, interpretation per leg, and usage guidance. Despite no output schema, the description compensates thoroughly for a one-parameter query tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with a clear description for tradeId. The description repeats the empty-array behavior already in the schema, adding no new parameter-level meaning. Thus baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly specifies 'Real-time trade observability — per-leg HTLC settlement state for a trade' with specific details on what is returned. Distinguishes from sibling tools like list_my_trades and list_open_rfqs by stating it covers settlement-leg state only.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit 'USE WHEN' scenarios (showing trade status, deciding next action, polling) and a 'DO NOT USE WHEN' section naming alternative tools, guiding appropriate invocation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_my_tradesA
List the caller's trades (active + historical). Read-only. Primary tool for rebuilding state after losing conversation context.
USE WHEN: an agent restarted/lost context and must resync in-flight settlements, or showing the user their trade history. DO NOT USE WHEN: you need open market demand (use list_open_rfqs) or per-leg HTLC detail for one trade (use get_htlc).
Optional status filter narrows the page. For settlement-leg detail on a specific trade, follow up with get_htlc(tradeId).
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Optional trade-status filter (e.g. ACTIVE, COMPLETED). Omit for all. | |
| page | No | 1-based page number. Default 1. | |
| pageSize | No | Page size, 1-100. Default 20. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so the description must cover behavioral traits. It only states 'Read-only' and 'list the caller's trades.' No mention of output ordering, pagination behavior beyond schema, rate limits, or authorization needs. For a list operation, more detail on what to expect would be helpful.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose in the first sentence. It then provides use-case guidance, exclusions, and a follow-up hint. Could be slightly more structured, but every sentence serves a clear purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could explain what fields the returned trades contain or default sorting. It mentions a follow-up tool (get_htlc) but lacks details on output format or behavior when no trades exist. Still, it covers usage context and alternatives well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema has full description coverage (100%), so baseline is 3. The description adds 'Optional status filter narrows the page,' which restates what the schema already says about the status parameter. No additional meaning is provided for page or pageSize beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List the caller's trades (active + historical). Read-only.' It identifies the specific resource (caller's trades) and scope (active+historical). It explicitly distinguishes from sibling tools like list_open_rfqs and get_htlc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when-to-use scenarios: 'when an agent restarted/lost context and must resync in-flight settlements, or showing the user their trade history.' Also gives clear when-not-to-use: 'DO NOT USE WHEN: you need open market demand (use list_open_rfqs) or per-leg HTLC detail for one trade (use get_htlc).' Includes follow-up guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_open_rfqsA
List currently open (ACTIVE) RFQs awaiting market-maker quotes. Read-only.
USE WHEN: acting as a market-maker agent deciding what to quote on, or showing the user live demand. DO NOT USE WHEN: you want your own trade history (use list_my_trades).
Returns a page of RFQs (id, baseToken, quoteToken, side, amount, isBlind, status, expiresAt). To quote, call respond_rfq with the rfqId.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | 1-based page number. Default 1. | |
| pageSize | No | Page size, 1-100. Default 20. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so description carries full burden. Declares 'Read-only', describes return fields, and mentions pagination. Does not detail rate limits or authentication, but is sufficient for typical use.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is only 3 sentences, front-loaded with the core purpose. Every sentence provides value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Even without an output schema, the description names the return fields and links to the next logical action (respond_rfq). Pagination is explained, and the tool's role in the workflow is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with well-described parameters (page and pageSize). Description does not add additional meaning beyond the schema, so baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'List currently open (ACTIVE) RFQs' with specific verb and resource. Distinguishes from siblings like list_my_trades and respond_rfq by mentioning when each should be used.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides use cases: 'USE WHEN: acting as a market-maker agent deciding what to quote on... DO NOT USE WHEN: you want your own trade history (use list_my_trades).' Also directs to respond_rfq for quoting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_supported_pairsA
List the chain-qualified token pairs Hashlock supports for RFQ/swap. Read-only, no auth side effects.
USE WHEN: before create_rfq if unsure a token/chain is supported, or to show the user available markets instead of guessing. DO NOT USE WHEN: you already know the pair is supported — this is discovery, not a precondition.
Each entry is SYMBOL/chain. Same symbol on different chains (e.g. SUI/sui vs SUI/sui-testnet) are distinct markets — pass baseChain/quoteChain explicitly to create_rfq.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses read-only nature and no auth side effects. Explains that same symbol on different chains are distinct markets, which is a behavioral trait beyond basic description. No rate limits or pagination mentioned, but acceptable for a simple list with no parameters.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three paragraphs with clear front-loaded first sentence. Each sentence adds value, though could be slightly more concise by merging some lines. Overall well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete context for a parameterless list tool: explains entry format (SYMBOL/chain), usage hints, and distinctions between chains. No output schema needed as purpose is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters in schema, so description does not need to add parameter info. Schema coverage is 100% (no params). Baseline 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool lists chain-qualified token pairs supported for RFQ/swap. The use of specific verb 'list' and resource 'token pairs' sets a precise scope, distinguishing it from siblings like create_rfq or swap_quote.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides when to use ('before create_rfq if unsure a token/chain is supported', 'to show available markets') and when not to use ('if already know the pair is supported'), including the rationale that this is for discovery, not a precondition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
refund_htlcA
Trustless unwind — recover locked funds after the HTLC timelock expires. Non-custodial refund guarantee: if the swap does not complete, the original sender reclaims their asset with zero counterparty risk.
USE WHEN: the timelock deadline has passed AND the counterparty never locked their side (or the swap otherwise failed to complete). DO NOT USE WHEN: counterparty HAS locked and the swap can still complete — use withdraw_htlc instead. Only the original lock sender can call refund, and only after the deadline.
PARAM NOTES: txHash is the on-chain refund tx hash (0x-prefixed). No preimage needed — expiry alone unlocks the refund path. Set chainType to "bitcoin" or "sui" for non-EVM legs.
| Name | Required | Description | Default |
|---|---|---|---|
| tradeId | Yes | Trade ID | |
| txHash | Yes | On-chain refund transaction hash (0x-prefixed) | |
| chainType | No | Chain type: evm, bitcoin, or sui | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description carries full behavioral burden. It explains the refund mechanism (non-custodial, trustless, no preimage needed) and conditions. However, it omits details on idempotency or success/failure behavior beyond the parameter note for client_request_id.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is well-structured into a title, usage conditions, parameter notes. Every sentence adds value, no redundancy. Appropriate length for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and moderate parameter count, the description covers usage context, parameter semantics, and behavioral intent. It lacks error scenarios or return value details, but is sufficient for an agent to invoke correctly in the stated conditions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (baseline 3). Description adds value by clarifying that 'txHash' is on-chain 0x-prefixed and that 'chainType' should be 'bitcoin' or 'sui' for non-EVM legs, which is not obvious from the schema alone. Also explains 'client_request_id' as an idempotency key.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Trustless unwind — recover locked funds after the HTLC timelock expires.' It distinguishes from sibling 'withdraw_htlc' by specifying when NOT to use it, providing a specific verb-resource pair and scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit 'USE WHEN' and 'DO NOT USE WHEN' sections with concrete conditions (timelock deadline passed, counterparty didn't lock) and an alternative tool named (withdraw_htlc). Also notes that only the original lock sender can call refund, and only after deadline.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
respond_rfqA
Market-maker tool — submit a sealed-bid price quote to compete on an open RFQ. Quotes are private: other makers cannot see your price, and losing bids are never revealed. No funds are locked until the requester accepts a quote.
USE WHEN: the MCP client is acting as a market maker and has decided to quote on a specific open RFQ (obtained via list_open_rfqs). DO NOT USE WHEN: acting as an end-user buyer or seller who wants to receive quotes — use create_rfq instead. This is the market-maker side only; sealed bids, not open negotiation.
PARAM NOTES: price is per unit of base token in quote-token terms (e.g. "3450.00" for ETH priced in USDT). amount is base-token amount offered. No funds are locked at quote time — settlement only begins when the requester accepts.
| Name | Required | Description | Default |
|---|---|---|---|
| rfqId | Yes | ID of the RFQ to respond to | |
| price | Yes | Price per unit of base token in quote token terms (e.g., "3450.00") | |
| amount | Yes | Amount of base token to offer | |
| expiresIn | No | Quote expiration in seconds | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses sealed-bid privacy, no funds locked until acceptance, losing bids not revealed, and idempotency key behavior. No annotations provided, so description fully covers safety and behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise, well-organized with USE WHEN, DO NOT USE, PARAM NOTES sections. No redundant information, every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 5 parameters and no output schema, the description covers purpose, usage, parameter details, and behavioral notes comprehensively. No obvious gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, baseline 3. Description adds clarifying context: price format with example, amount as base token, and funds-lock semantics for idempotency key. Exceeds baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it is a market-maker tool for submitting sealed-bid price quotes on open RFQs. Differentiates from sibling tools like create_rfq and list_open_rfqs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit USE WHEN and DO NOT USE conditions, including specific alternatives (create_rfq). Guides agent on correct invocation context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swap_cancelA
Abort an open swap before it executes (cancels the underlying RFQ). No funds were locked. Use when the limit never meets, the user changed their mind, or to clean up a stale swap_handle.
USE WHEN: backing out of a swap_quote that has not been executed. DO NOT USE WHEN: the swap already executed (a trade exists) — settlement is governed by the HTLC timelock, not this tool.
PARAM NOTES: idempotent within a session via client_request_id.
| Name | Required | Description | Default |
|---|---|---|---|
| swap_handle | Yes | The swap_handle (RFQ id) to cancel. | |
| client_request_id | No | Idempotency key. Best-effort within this session. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description discloses key behaviors: no funds locked, idempotency via client_request_id, and that settlement for executed swaps is governed by HTLC timelock. No contradictory information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the main action, and uses bullet-style headers ('USE WHEN', 'DO NOT USE WHEN', 'PARAM NOTES') for clarity. Every sentence adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description covers all necessary aspects: purpose, usage conditions, parameter notes, and idempotency. No gaps are apparent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds only incremental value by explaining swap_handle as 'RFQ id' and client_request_id as 'Idempotency key. Best-effort within this session.' This is helpful but not essential.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Abort') and resource ('open swap'), clearly distinguishing from sibling tools like swap_execute or swap_quote. It also clarifies no funds are locked.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use (backing out of unexecuted swap_quote) and when not to use (swap already executed), with examples like limit not met or user changed mind. Provides clear exclusion criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swap_executeA
Accept the winning sealed bid for a swap and create the trade. Real funds. Provide EITHER limit_price (auto-takes the best bid only if it meets your bound) OR quote_id (the exact bid you saw via swap_status). With neither, this refuses (CONFIRMATION_REQUIRED) rather than guess — restate the price to the user first.
USE WHEN: a swap has an acceptable bid and the user confirmed. DO NOT USE WHEN: you have not surfaced the price to the user, or you want maker-side quoting (use respond_rfq).
PARAM NOTES: limit_price is the sealed reservation (SELL=floor, BUY=ceiling) and must be re-supplied here — it is deliberately never stored. WARNING: accepted_amount may EXCEED your requested amount if a maker quoted a larger size (full-fill v1 accepts a bid whose amount covers the request) — always reconcile accepted_amount against what you asked before settling on-chain. On success returns trade_id; settle on-chain next via create_htlc. This does NOT lock funds itself (non-custodial).
| Name | Required | Description | Default |
|---|---|---|---|
| swap_handle | Yes | The swap_handle (RFQ id) from swap_quote. | |
| limit_price | No | Sealed reservation. SELL=floor, BUY=ceiling. Re-supply it here; never persisted. | |
| quote_id | No | Exact bid id from swap_status best_bid.quote_id (explicit-confirm path). | |
| client_request_id | No | Idempotency key. Same id within this session returns the first result instead of accepting twice. Best-effort. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully discloses behavioral traits: real funds, non-custodial (doesn't lock funds), acceptance behavior with missing parameters (CONFIRMATION_REQUIRED), warning about accepted_amount exceeding requested amount, and fact that limit_price is re-supplied and not stored.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is well-structured with sections (description, use when, param notes, warnings) and front-loaded with the core action. Though slightly long, each sentence adds necessary value for a real-funds tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite no output schema, the description covers return value (trade_id) and next step (create_htlc). It also addresses edge cases (missing parameters, size exceeding request) and constraints (non-custodial). Fully sufficient for an agent to use correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage with descriptions. The description adds significant meaning: limit_price is sealed reservation and must be re-supplied, quote_id is exact bid from swap_status, client_request_id is idempotency key. This goes beyond the schema's basic descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states it accepts the winning sealed bid and creates a trade, differentiating from sibling tools like respond_rfq. The verb 'accept' and resource 'swap' are specific, and the description distinguishes from maker-side quoting.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides USE WHEN (swap has acceptable bid and user confirmed) and DO NOT USE WHEN (price not surfaced or want maker-side quoting), with alternative tool named (respond_rfq). This gives clear decision criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swap_quoteA
One-call OTC swap intake for agents — opens a sealed-bid Ghost Auction under the hood and waits briefly for the first private market-maker bids, then hands back a swap_handle + the best bid so far. Async by design: there is NO public synchronous price (that is the privacy guarantee). Zero slippage: the bid you execute is the fill.
USE WHEN: an agent/user wants to "just swap X for Y" and have the facade manage quote collection + best-bid selection + a price guard. Privacy-sensitive or large flow. DO NOT USE WHEN: the caller wants explicit market-maker-aware RFQ control and will pick/accept quotes itself — use create_rfq. Sub-second DEX fills — use a DEX aggregator.
PARAM NOTES: limit_price is your sealed reservation — for SELL it is a FLOOR (min you will accept), for BUY a CEILING (max you will pay), per unit of base in quote-token terms. It is NEVER sent to makers. private defaults true (Ghost Auction ON — hides your identity from bidders); set false for an open auction. After this returns, call swap_execute (with the same limit_price, or best_bid.quote_id) to take it, swap_status to let competition build, or swap_cancel to abort. Real funds: restate the resolved deal to the user before executing.
| Name | Required | Description | Default |
|---|---|---|---|
| side | Yes | SELL = dispose of baseToken; BUY = acquire baseToken. | |
| baseToken | Yes | Base asset symbol (see list_supported_pairs). | |
| baseChain | No | Chain the base token settles on. | |
| quoteToken | Yes | Quote asset symbol. | |
| quoteChain | No | Chain the quote token settles on. | |
| amount | Yes | Base-token amount as a raw decimal string ("0.1", "2"). Do NOT convert to wei/satoshis. | |
| limit_price | No | Sealed reservation. SELL=floor, BUY=ceiling, per unit of base in quote terms. Never sent to makers. | |
| private | No | Ghost Auction (hide requester identity). Default true. Set false for an open auction. | |
| expiresIn | No | RFQ lifetime seconds. Default 300. Hard cap 86400. | |
| max_wait_seconds | No | How long swap_quote waits for first bids. Default 20, capped 25. | |
| client_request_id | No | Idempotency key. Same id within this MCP session returns the first result instead of opening a second RFQ. Best-effort: not durable across restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes async nature, no synchronous price, zero slippage, ghost auction mechanism, limit_price secrecy, parameter defaults, and idempotency. No annotations provided, so description carries full burden and does so comprehensively.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with front-loaded summary, usage guidelines, parameter notes, and follow-up calls. Slightly lengthy but every sentence adds value; could be tightened slightly but overall effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 11 parameters, no output schema, and no annotations, the description covers return value, async behavior, privacy, parameter details, and post-call actions. Complete enough for proper use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds extra context in PARAM NOTES: limit_price as floor/ceiling, private default meaning, client_request_id best-effort idempotency, max_wait_seconds and expiresIn caps. This adds value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool as a one-call OTC swap intake that opens a sealed-bid Ghost Auction, returning a swap_handle and best bid. It distinguishes from sibling tools like create_rfq and DEX aggregators, providing specific verb and resource.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly provides USE WHEN and DO NOT USE conditions, naming alternatives (create_rfq, DEX aggregator) and contexts (privacy-sensitive, large flow). Also maps follow-up tools (swap_execute, swap_status, swap_cancel).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
swap_statusA
Re-poll an open swap by its swap_handle — returns the current best sealed bid + how many bids are in. Read-only, stateless: the primary way to resume a swap after losing context (only the swap_handle is needed).
USE WHEN: letting maker competition build before executing, or rebuilding an in-flight swap after a context reset. DO NOT USE WHEN: you need settlement-leg detail (use get_htlc) or your trade history (use list_my_trades).
PARAM NOTES: returns best_bid (or null), bids_seen, still_open and rfq_status. When best_bid is present, swap_execute with the same limit_price (or best_bid.quote_id) to take it.
| Name | Required | Description | Default |
|---|---|---|---|
| swap_handle | Yes | The swap_handle returned by swap_quote (the RFQ id). | |
| max_wait_seconds | No | Bounded wait for new bids this call. Default 15, capped 25. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description explicitly states read-only and stateless, describes output fields (best_bid, bids_seen, still_open, rfq_status), and explains the follow-up action with swap_execute, providing comprehensive behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-organized with distinct sections; each sentence adds necessary information without redundancy. The description is compact and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description covers purpose, usage, parameters, output, and follow-up actions adequately. It could mention error handling but is complete for its complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The description adds value by explaining response fields and how to use them with swap_execute, enhancing semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool re-polls an open swap using swap_handle, returning the current best sealed bid and bid count. It distinguishes from siblings by referencing get_htlc and list_my_trades for different needs, making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicit 'USE WHEN' and 'DO NOT USE WHEN' sections provide specific scenarios and alternative tool names (get_htlc, list_my_trades), offering clear decision guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
withdraw_htlcA
Atomic claim — reveals the 32-byte preimage to unlock both legs of the swap simultaneously. Trustless cross-chain finality: no intermediary holds funds at any point.
USE WHEN: counterparty has confirmed their lock on-chain and the user wants to claim their side of the swap. DO NOT USE WHEN: counterparty lock is not yet confirmed on-chain, OR the timelock has already expired — use refund_htlc instead.
PARAM NOTES: preimage must be 0x-prefixed 32-byte hex. Revealing the preimage is what makes the swap atomic — it simultaneously unlocks the counterparty leg. Set chainType to "bitcoin" or "sui" for non-EVM legs.
| Name | Required | Description | Default |
|---|---|---|---|
| tradeId | Yes | Trade ID | |
| txHash | Yes | On-chain claim transaction hash (0x-prefixed) | |
| preimage | Yes | The 32-byte secret preimage (0x-prefixed hex) | |
| chainType | No | Chain type: evm, bitcoin, or sui | |
| client_request_id | No | Idempotency key. Retrying the SAME write with the SAME id within this MCP session returns the first result instead of triggering a second on-chain/backend side effect. Best-effort: not durable across MCP restarts. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Reveals that revealing the preimage makes the swap atomic and simultaneously unlocks the counterparty leg. Lacks mention of irrevocability or on-chain txHash requirement, but sufficient for the operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Compact description with clear structure: one-line summary, use/don't-use section, and param notes. Every sentence provides necessary information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers purpose, usage, and key parameters adequately. No output schema, but for a claim operation, missing return value info is acceptable given the straightforward nature.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. Adds value by specifying preimage format (0x-prefixed 32-byte hex) and chainType for non-EVM legs beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly describes the tool as an atomic claim that reveals the preimage to unlock both legs. Distinguishes from sibling 'refund_htlc' by mentioning timelock expiry.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to use and when not to use, including a specific alternative tool (refund_htlc) for expired timelocks.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
13 tool updates
v0.4.0- First observed
create_htlc - First observed
create_rfq - First observed
get_htlc - First observed
list_my_trades - First observed
list_open_rfqs - First observed
list_supported_pairs - First observed
refund_htlc - First observed
respond_rfq - First observed
swap_cancel - First observed
swap_execute - First observed
swap_quote - First observed
swap_status - First observed
withdraw_htlc
TDQS
Tools are generally distinct across settlement (HTLC) and RFQ/swap domains. However, create_rfq and swap_quote have overlapping functionality, with swap_quote acting as a higher-level wrapper, which could cause confusion about which to use. Otherwise, well-separated.
Most tools follow verb_noun (create_htlc, list_my_trades) but swap tools use noun_verb (swap_cancel, swap_execute), creating inconsistency. The pattern is mostly predictable, but the mix reduces coherence.
13 tools cover the full lifecycle of atomic swaps and OTC trading without being excessive. Each tool has a clear role, and the count is well-scoped for the server's purpose.
The tool surface covers the complete workflow: RFQ creation, quoting, execution, cancellation, HTLC locking, status polling, refund, and withdrawal. No obvious gaps for the core domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Multi-agent coordination protocol on Solana. Swarm formation, on-chain settlement, 14 MCP tools.
Agent MCP for DeFi: cross-chain LINQ fan-out, AMM quotes/swaps, bridge, AI. Solana+EVM. Free+x402.
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
OracleNet Deal Discovery Protocol — permissioned commercial matching for MCP/A2A agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server designed for AI agents to perform optimal token swaps on the Sui blockchain.6MIT

hashlock-mcp-serverofficial
AlicenseAqualityDmaintenanceHashlock Markets (hashlock.markets) — sealed-bid intent-based crypto trading protocol with HTLC atomic settlement. AI agents can create, commit, and validate trading intents on Ethereum, Bitcoin, and Sui. Canonical npm package: @hashlock-tech/mcp. Not the cryptographic hashlock primitive, not Hashlock Pty Ltd (hashlock.com).521MIT
Haiku DeFi MCPofficial
AlicenseAqualityFmaintenanceMCP server for DeFi execution — lets AI agents swap, provide liquidity, lend, bridge, and run yield strategies across 22 chains in a single transaction. 7 tools for token discovery, portfolio analysis, quoting, and execution via the Haiku API.7832MIT- FlicenseNot gradedqualityBmaintenanceSettlement rails for AI labor — USDC escrow on Base Mainnet, 1% protocol fee, designed for autonomous agents. 10 MCP tools covering the full escrow lifecycle: * Quoting calldata for create-intent, submit-proof, release-funds (broadcast gated) * Single-call x402 payment binding (replaces the 5-step x402 dance with one HMAC-signed POST) * Server-side reputation from on-chain event scan * Li-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hashlock-Tech/hashlock-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server