Skip to main content
Glama

Prepare an Otto-attributed LI.FI swap

otto_prepare_swap
Read-only

Prepare, decode, and verify an unsigned same-chain EVM ERC20 swap construction aid for the caller-owned EOA or Safe. The envelope's valid_until bounds freshness and is committed to the artifact digest; the signer account nonce is the on-chain replay boundary, and this tool cannot guarantee single execution. Returns ordered allowance-reset, approval, and call steps only; never signs or submits. Every envelope from this server is valid for 300 seconds from construction (valid_until); a stale envelope is refused by the verifier — request a fresh one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainIdYes
toTokenYesERC20 output token address; native-token routes are out of v1.
slippageYes
fromTokenYesERC20 input token address; native-token routes are out of v1.
client_refNo
fromAmountYesExact input amount in atomic token units.
accountProfileYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
railYes
payloadYes
operationYes
assertionsYes
submissionYes
artifact_idYes
valid_untilYes
intent_digestYes
schema_versionYes
account_bindingYes
fee_attributionYes
replay_disclosureYes
required_capabilitiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description provides rich behavioral detail beyond the readOnlyHint annotation: it never signs or submits, returns only ordered steps, has a 300-second validity window, and is committed to an envelope digest with nonce as replay boundary. It also notes inability to guarantee single execution, which complements the openWorldHint. This goes well beyond the basic annotation.

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?

The description is dense but not verbose; it front-loads the core purpose and then layers critical behavioral constraints (validity, nonce, no signing, stale refusal). Each sentence adds value, and the 4-sentence length is appropriate for the tool's complexity.

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?

Given the tool's complexity (7 parameters, nested objects, output schema exists), the description provides strong behavioral context but omits parameter-level guidance entirely. It explains the envelope lifecycle and return format but does not help an agent understand what inputs mean or how they map to the output. The output schema partially offsets this, but a description for a complex tool like this should cover parameter intent.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 43%, so the description must compensate for unexplained parameters. It does not explain accountProfile, slippage, chainId, client_ref, or fromAmount semantics beyond what the schema already says. The description focuses on envelope freshness and nonce, not on input parameters, leaving significant ambiguity for an agent.

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 states a specific verb ('prepare, decode, verify') and resource ('same-chain EVM ERC20 swap construction aid') and distinguishes it from sibling tools like bridge or perp order by explicitly saying 'same-chain' and 'swap'. It clearly identifies what the tool does and for whom (caller-owned EOA or Safe).

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 description implies usage for same-chain ERC20 swaps and mentions it's for the 'caller-owned EOA or Safe', but it does not explicitly name alternatives or state when not to use this tool. There is no direct contrast with the bridge, perp, or polymarket sibling tools, so guidance is implied rather than explicit.

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.

Resources