Skip to main content
Glama

Chainflip Broker as a Service

Start DCA Swap

start_dca_swap

Start a DCA (Dollar Cost Averaging) cross-chain swap that splits into multiple sub-swaps over time. Returns the deposit address. API key is optional.

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": {
      "sourceAsset": "<sourceAsset>",
      "destinationAsset": "<destinationAsset>",
      "destinationAddress": "<destinationAddress>",
      "refundAddress": "<refundAddress>",
      "numberOfChunks": "<numberOfChunks>"
    },
    "name": "start_dca_swap"
  }
}

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
numberOfChunksYesNumber of sub-swaps for DCA (Dollar Cost Averaging). Values below 1 are treated as 1.
destinationAssetYesDestination asset identifier (e.g., 'eth.eth', 'btc.btc', 'sol.sol')
destinationAddressYesDestination address on the target chain
chunkIntervalBlocksNoOptional delay between DCA sub-swaps in state-chain blocks (1 block = 6 seconds). Defaults to 2 blocks (12 seconds) when omitted or negative; 0 with more than one chunk becomes 2. A schedule longer than Chainflip's limit is shortened.
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 a sub-swap is retried and the rest refunded. Use a quote's recommendedLivePriceSlippageTolerancePercent. When either asset has no oracle price on Chainflip, live price protection is omitted and the swap proceeds without it. When omitted, Chainflip's default protection for the pair applies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / chunkIntervalBlocks / description
      Previous value: -"Optional delay between DCA sub-swaps in state-chain blocks (1 block = 6 seconds). Defaults to 2 blocks (12 seconds)."New value: +"Optional delay between DCA sub-swaps in state-chain blocks (1 block = 6 seconds). Defaults to 2 blocks (12 seconds) when omitted or negative; 0 with more than one chunk becomes 2. A schedule longer than Chainflip's limit is shortened."
    • changedInput schema / properties / livePriceSlippageTolerancePercent / description
      Previous value: -"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 a sub-swap is retried and the rest 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."New value: +"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 a sub-swap is retried and the rest refunded. Use a quote's recommendedLivePriceSlippageTolerancePercent. When either asset has no oracle price on Chainflip, live price protection is omitted and the swap proceeds without it. When omitted, Chainflip's default protection for the pair applies."
    • changedInput schema / properties / numberOfChunks / description
      Previous value: -"Number of sub-swaps for DCA (Dollar Cost Averaging). Must be >= 1."New value: +"Number of sub-swaps for DCA (Dollar Cost Averaging). Values below 1 are treated as 1."
  2. 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 a sub-swap is retried and the rest 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"
      +  ]
      +}
  3. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already disclose the mutation profile (readOnlyHint=false, idempotentHint=false, openWorldHint=true), so the description's main added value is telling the agent this call returns a deposit address to fund rather than executing settlement immediately. It does not disclose refund behavior, what happens if the deposit is never made, or timing/expiry of the deposit address — meaningful gaps for a fund-moving operation.

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 short sentences with the core purpose front-loaded and the return value stated early. Nothing is padded and there is no redundancy.

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 9-parameter financial mutation the description covers what the tool is and what it returns, and the rich schema plus annotations carry the parameter and safety detail. What is missing is the operational next step — funding the returned deposit address and refund conditions — which matters for a swap of this complexity.

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

Parameters4/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 adds a small amount by noting the API key is optional, confirming a non-blocking auth path. Beyond that it adds no meaning the schema itself does not already carry for minimumPrice, chunkIntervalBlocks, or livePriceSlippageTolerancePercent.

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 DCA cross-chain swap') and immediately explains the distinguishing mechanism ('splits into multiple sub-swaps over time'), which separates it in spirit from the sibling start_swap. It never names start_swap or contrasts the two explicitly, so the differentiation is implied rather than stated.

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?

Usage is only implied: an agent can infer DCA is for time-sliced execution rather than a one-shot swap. There is no explicit when-to-use/when-not guidance, no prerequisites (e.g., you must fund the returned deposit address), and no routing to start_swap or get_quotes for single swaps or pre-trade pricing.

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.