Skip to main content
Glama

Chainflip Broker as a Service

Start Swap

start_swap

Start a cross-chain swap. Returns the deposit address where you should send your source asset. API key is optional.

Input Schema

NameRequiredDescriptionDefault
apiKeyNoOptional partner API key.
sourceAssetYesSource asset identifier (e.g., 'btc.btc', 'eth.eth', 'usdc.eth')
minimumPriceNoOptional minimum accepted price as a destination-per-source ratio (e.g., for a btc.btc to eth.eth swap, 28.5 means 1 BTC gets at least 28.5 ETH). When omitted, automatically calculated from current pool prices with 2% slippage tolerance. Set to 0 to accept any price.
refundAddressYesRefund address on the source chain, used if minimum price cannot be met
destinationAssetYesDestination asset identifier (e.g., 'eth.eth', 'btc.btc', 'sol.sol')
destinationAddressYesDestination address on the target chain
livePriceSlippageTolerancePercentNoOptional live price protection: how far, in percent (0 to 100, at most 2 decimals, e.g. 0.5), the execution price may fall below Chainflip's oracle price before the swap is retried and then refunded. Use a quote's recommendedLivePriceSlippageTolerancePercent. Rejected when either asset has no oracle price on Chainflip. When omitted, Chainflip's default protection for the pair applies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / livePriceSlippageTolerancePercent
      Added value: +{
      +  "default": null,
      +  "description": "Optional live price protection: how far, in percent (0 to 100, at most 2 decimals, e.g. 0.5), the execution price may fall below Chainflip's oracle price before the swap is retried and then refunded. Use a quote's recommendedLivePriceSlippageTolerancePercent. Rejected when either asset has no oracle price on Chainflip. When omitted, Chainflip's default protection for the pair applies.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, openWorldHint=true and destructiveHint=false, so the write/non-idempotent/non-destructive profile is covered. The description usefully discloses the deposit-address return value, but omits meaningful behavior: that the swap does not execute until funds reach that address, and that unmet price conditions route to the refundAddress. What it adds is thin relative to the annotations already carrying the safety profile.

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 the key return value. The closing 'API key is optional' is mild redundancy with the schema and is the only sentence that does not clearly earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter, non-idempotent swap-initiation tool with no output schema, the description does cover the critical return value (deposit address) and the essential next step of sending funds. It still leaves the lifecycle incomplete: no mention of monitoring via check_status, no note that each call creates a new swap, and no reference to the refund path already present in the schema.

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 schema already explains sourceAsset, destinationAsset, destinationAddress, refundAddress, minimumPrice and livePriceSlippageTolerancePercent in detail. The description contributes only 'API key is optional,' which duplicates the schema's own default of null and 'Optional partner API key.' Baseline 3 is appropriate.

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?

States a specific verb and resource ('Start a cross-chain swap') and adds the concrete outcome ('returns the deposit address where you should send your source asset'), which an agent can act on immediately. It does not explicitly distinguish itself from the sibling start_dca_swap, so an agent must infer that this is the one-off swap versus the recurring variant.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The return-value sentence implies the workflow (call this, then send the source asset to the deposit address), which is implied usage. However, there is no guidance on prerequisites or alternatives: nothing says to fetch get_quotes/get_native_quotes first, nor when to prefer this over start_dca_swap or how check_status fits afterward.

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.