Skip to main content
Glama
IndigoProtocol/indigo-mcp

IndigoProtocol/indigo-mcp

Official

create_stableswap_order

Swap pool collateral for an iAsset or redeem an iAsset for collateral, returning an unsigned CBOR transaction for client-side signing. Check pool details for collateral asset and minimum amounts.

Instructions

Submit a stableswap order: swap the pool collateral for iAsset (minting=true) or iAsset for the pool collateral (minting=false). Returns an unsigned transaction (CBOR hex) for client-side signing. See get_stableswap_pool for the collateral asset and minimum order amounts.

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": {
      "address": "<address>",
      "asset": "<asset>",
      "amount": "<amount>",
      "minting": "<minting>"
    },
    "name": "create_stableswap_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetYesiAsset name, e.g. iUSD
amountYesAmount to swap in the smallest unit of the asset being paid in: the collateral when minting, the iAsset when redeeming
addressYesUser Cardano bech32 address
mintingYestrue = collateral → iAsset (mint direction); false = iAsset → collateral (redeem direction)
collateralAssetNoCollateral asset of the pool: its token name (e.g. USDA), '<policyId>.<assetNameHex>', or ADA. Optional when the iAsset has a single stableswap pool, which is then used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.5.0
    • changedInput schema / properties / amount / description
      Previous value: -"Amount in smallest unit to swap"New value: +"Amount to swap in the smallest unit of the asset being paid in: the collateral when minting, the iAsset when redeeming"
    • changedInput schema / properties / asset / description
      Previous value: -"iAsset name (iUSD, iBTC, iETH, or iSOL)"New value: +"iAsset name, e.g. iUSD"
    • addedInput schema / properties / collateralAsset
      Added value: +{
      +  "description": "Collateral asset of the pool: its token name (e.g. USDA), '<policyId>.<assetNameHex>', or ADA. Optional when the iAsset has a single stableswap pool, which is then used.",
      +  "type": "string"
      +}
  2. Addedv0.4.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose two important traits: the output is an unsigned CBOR hex transaction requiring client-side signing, and the direction is controlled by minting. It omits whether an order record is created server-side, what happens on insufficient pool liquidity or below-minimum amounts, and whether slippage protection exists.

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?

Three short sentences, front-loaded with the action and direction, then the return type, then the prerequisite pointer. Slight redundancy in re-explaining minting direction that the schema already covers, but nothing extraneous.

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?

No output schema exists, and the description usefully explains the return value (unsigned CBOR hex for client-side signing). For a 5-parameter transaction-building tool it covers purpose, direction, output, and where to obtain pool data; the main gap is post-signing workflow and failure conditions.

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%, so the baseline is 3; the description largely restates the minting semantics already documented in the schema. It adds a small amount by framing collateralAsset as optional when a single pool exists, but no syntax or format detail beyond the 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 ("Submit a stableswap order") and immediately disambiguates the two directions via the minting flag, so an agent knows exactly what the call does. It also names the sibling get_stableswap_pool as the source of pool parameters, separating this tool from data lookup.

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 clear context for use — the minting true/false direction — and routes the agent to get_stableswap_pool for the collateral asset and minimum order amounts, which is a real prerequisite. It stops short of stating exclusions or what to do after the transaction is signed (e.g., submit vs cancel via cancel_stableswap_order).

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