Skip to main content
Glama

Build swap transaction

chord_swap_tx
Read-onlyIdempotent

The UNSIGNED transaction for a swap, plus the approval it needs and a simulation run as the taker. Nothing is sent: the taker's own wallet signs and broadcasts. Pass a quoteId from chord_quote, or the full parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoEVM chain key. Solana swaps are REST only: GET /v1/sol/trade/quote.
takerYesThe wallet that signs and receives.
amountNo
quoteIdNo
tokenInNoToken address: 0x… on EVM chains, the base58 mint on Solana (case-sensitive).
tokenOutNoToken address: 0x… on EVM chains, the base58 mint on Solana (case-sensitive).
slippageBpsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / chain / description
      Previous value: -"Chain key. chord_chains lists what each chain supports."New value: +"EVM chain key. Solana swaps are REST only: GET /v1/sol/trade/quote."
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "monad",
      -  "robinhood",
      -  "arc",
      -  "avalanche",
      -  "base",
      -  "bnb",
      -  "arbitrum",
      -  "ethereum",
      -  "solana"
      -]New value: +[
      +  "monad",
      +  "robinhood",
      +  "arc",
      +  "avalanche",
      +  "base",
      +  "bnb",
      +  "arbitrum",
      +  "ethereum"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "monad",
      -  "robinhood",
      -  "arc",
      -  "avalanche",
      -  "base",
      -  "bnb",
      -  "arbitrum",
      -  "solana"
      -]New value: +[
      +  "monad",
      +  "robinhood",
      +  "arc",
      +  "avalanche",
      +  "base",
      +  "bnb",
      +  "arbitrum",
      +  "ethereum",
      +  "solana"
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, and the description reinforces this by explaining why: nothing is sent, the taker's own wallet signs and broadcasts. It also discloses that the response bundles an approval and a simulation, which annotations cannot express. It stops short of stating expiry, refresh, or failure behavior of the returned payload.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with what the tool returns, then the safety constraint, then the invocation. No filler; every sentence carries distinct information.

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 no output schema, the description carries the return-value burden and does so well by naming the transaction, approval and simulation. The main residual gap is the quoteId-vs-full-parameters branch: it does not say which of tokenIn/tokenOut/amount become unnecessary when quoteId is supplied.

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 coverage is 57%; chain, taker, tokenIn and tokenOut are documented in the schema. The description adds real meaning for quoteId (it comes from chord_quote and is an alternative to passing full parameters) but leaves amount and slippageBps unexplained in both places. Baseline 3 is appropriate given the partial coverage.

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 ('The UNSIGNED transaction for a swap') and enumerates the three artifacts returned: the transaction, the approval, and a taker simulation. It also names the sibling that feeds it ('a quoteId from chord_quote'), so an agent can separate it from chord_quote 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 Guidelines4/5

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

Gives a clear invocation path: pass a quoteId from chord_quote, or the full parameters. That routes the agent correctly, but it never states when this tool is inappropriate (e.g. Solana, which the schema notes is REST-only) or what happens if both a quoteId and full parameters are supplied.

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.