Skip to main content
Glama
Splits MCP Server

Splits MCP Server

Official

transactions_create_swap

Creates a human-approvable swap proposal that sells an exact token amount for another, fetching the quote and building calls; optionally bridges to a destination chain.

Instructions

Create a proposal, for a human signer to approve, that sells an exact amount of one token for another, like the swap form in the web app. Pass destinationChainId to receive buyToken on another chain, which bridges the swap. The server fetches the quote and builds the calls. Specify amount in human-readable sellToken units (e.g. '100' for 100 USDC). Returns the proposal with the quoted buy amount and a signUrl.

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": {
      "account": "<account>",
      "chainId": "<chainId>",
      "sellToken": "<sellToken>",
      "buyToken": "<buyToken>",
      "amount": "<amount>"
    },
    "name": "transactions_create_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNoOptional memo for the transaction (max 500 chars)
amountYesThe amount of sellToken to sell, in human-readable units (e.g., '100' for 100 USDC)
accountYesThe smart account address to create the proposal from (0x-prefixed, 40 hex chars)
chainIdYesThe chain ID where the account sells sellToken; the proposal runs on this chain (e.g., 1 for Ethereum, 8453 for Base)
buyTokenYesThe token received on destinationChainId (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH). An Earn token deposits into that vault and is allowed only when the recipient is an account in this workspace
propertyNoString key/value overlays for properties; repeatable. Splits on the first '='. Example: --property invoice=INV-42
recipientNoAddress that receives buyToken. Defaults to the account. Any other address adds a transfer to the proposal
sellTokenYesThe token the account sells on chainId (use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH). An Earn token withdraws from that Earn position
workspaceNoWorkspace alias to run this command in (see `splits auth workspaces`). Overrides SPLITS_WORKSPACE and the active workspace.
propertiesNoOptional custom JSON metadata. Total minified ≤ 500 chars. Used as the base; any --property overlays are applied on top. To load from a file, use shell substitution: --properties "$(cat props.json)"
slippageBpsNoSlippage tolerance in basis points (1 to 10000). Defaults to the web app's swap form default for the pair: 10 for two stablecoins, 50 for stablecoins and major assets, 150 otherwise
destinationChainIdNoThe chain ID where buyToken is received. Defaults to chainId. A different chain bridges the swap, like the web app swap form with another destination chain

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description does meaningful work: it discloses this is a proposal requiring human signer approval, that the server fetches the quote and builds the calls, and that it returns a proposal with quoted buy amount and a signUrl. It omits quote expiry, slippage behavior, and failure modes, keeping it from a 5.

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?

Five tight, front-loaded sentences that each carry distinct information: purpose, cross-chain flag, server-side quote building, amount units, and return shape. No filler.

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 12-parameter mutation with no output schema and no annotations, the description covers the essentials an agent needs: proposal vs execution, amount unit semantics, cross-chain behavior, and the return shape (proposal plus signUrl). It could do a bit more on slippage defaults and recipient transfer implications, but is largely complete.

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 100%, so parameters are already documented, and the description largely repeats that (human-readable amount units, destinationChainId bridging). It adds the useful 'human signer approval' framing but little parameter meaning 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 ('Create a proposal ... that sells an exact amount of one token for another') and grounds it in a familiar analogue ('like the swap form in the web app'). This clearly separates it from sibling proposal builders like transfer, custom, and earn-deposit.

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?

Explains the key branch: pass destinationChainId to receive buyToken on another chain, which triggers bridging. It implies the exact-input swap context and human-readable amount usage, but does not explicitly name alternatives or say when not to use it (e.g., vs create_custom or create_transfer).

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

Deploy Server

Other Tools