Skip to main content
Glama

Execute a token swap (EVM)

swop_swap
Destructive

Execute an on-chain token swap from the linked user's Swop wallet, within their delegation caps. EVM only (via LiFi); Solana swaps still complete in the app. TWO-STEP like swop_send: call WITHOUT confirm to preview (estimated output, min received, USD value, caps); show the user the estimated output and get their explicit yes; then call again with the returned previewId and confirm: true. Gas is sponsored, and any needed token approval is handled automatically. Over-cap or no delegation returns a Swop-app approval link. Pass chain plus token ADDRESSES; amount is in the input token's base units.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesEVM chain: base, ethereum, polygon, arbitrum, or a numeric chain id
amountYesInput amount in base units (wei / token decimals)
confirmNotrue ONLY after the user confirmed the preview (output shown)
inputMintYesInput token EVM contract address
previewIdNoFrom the preview step
outputMintYesOutput token EVM contract address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already indicate destructive and non-read-only behavior, and the description fully aligns by describing an on-chain execution. It adds substantial behavioral context beyond annotations: gas is sponsored, token approvals are automatic, over-cap returns an approval link, and a mandatory two-step confirmation with explicit user consent is required.

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?

The description is dense but every sentence carries essential information: scope, network restriction, two-step protocol, user confirmation requirement, gas/approval behavior, and unit/address conventions. It is suitably front-loaded and avoids filler.

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

Completeness5/5

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

Given the tool's complexity, the description covers all critical operational aspects: when to use it, how to sequence preview and confirm calls, what counts as confirmation, unit semantics, and failure behavior. No output schema exists, so the description appropriately focuses on invocation behavior rather than return types.

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 coverage is 100%, so baseline is 3, but the description adds meaningful extra guidance: amounts must be in base units, tokens are specified by EVM contract addresses, and previewId/confirm are tied to the preview step. This clarifies how to construct the two-step call beyond the schema's field descriptions.

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?

The description clearly states the specific action: executing an EVM token swap from the user's Swop wallet, within delegation caps. It also distinguishes itself from alternatives by noting 'EVM only (via LiFi); Solana swaps still complete in the app.' This is precise and differentiates from sibling tools like swop_send.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: EVM swaps only, while Solana swaps are excluded and handled in the app. It also provides a detailed step-by-step workflow: call without confirm to preview, show results to the user, obtain explicit yes, then call again with previewId and confirm:true. It even covers the over-cap/no-delegation fallback with an approval link.

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.