Skip to main content
Glama

Cleave for Agents: token swaps, cross-chain swaps and gas top-ups

Plan a swap, bridge or gas top-up

cleave_plan_swap
Read-onlyIdempotent

Plans a token swap on one chain, a cross-chain swap or bridge, or a native-gas top-up on Ethereum, Arbitrum, Base, BNB Chain, Polygon or Optimism, and returns unsigned transactions for the given wallet to sign. It fits when the user wants to exchange tokens, move them between these chains, or get ETH, BNB or POL for gas. It sends nothing and moves no funds. The answer leads with blocking notices and warnings, then gives the route's outcome kind (exact or at least a minimum; with a swap on arrival, the token, else a named fallback; where a transfer can go unfilled, a refund of the bridged token on the source chain hours later), every third-party cost except network gas, the expected time, validUntil and the calls in signing order. A blocking notice returns no calls; a warning, or a recipient other than the wallet, sets requiresConfirmation, and the connection's settings can turn either into a refusal. Calls sent after validUntil are stale: they can revert or, on some routes, end in a refund hours later. Amounts are decimal strings in token units; tokens are listed symbols or contract addresses; the recipient defaults to the wallet. Limits set in the connection (a pinned wallet, a per-plan USD cap, listed tokens only) bound every argument. For an ambiguous symbol, cleave_find_token lists the candidates; after sending, cleave_track_swap reports progress. A wallet with no gas can get it with cleave_get_gas.

Input Schema

NameRequiredDescriptionDefault
amountYesA decimal amount in token units
walletYes
buyTokenYesA listed symbol or a contract address
recipientNo
sellTokenYesA listed symbol or a contract address
toChainIdNo
fromChainIdYes
maxSlippageBpsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses that nothing is sent or moved, that a blocking notice yields no calls, that warnings or a non-wallet recipient set requiresConfirmation, that connection settings can escalate either to a refusal, and that calls after validUntil can revert or refund hours later. It also describes the response ordering (notices first, then outcome kind, third-party costs excluding gas, expected time, validUntil, calls in signing order) — a level of behavioral detail far beyond what annotations provide.

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?

Purpose and the 'sends nothing' safety note are front-loaded, and nearly every sentence carries operational weight (staleness, confirmation, refunds, costs). The single dense paragraph and heavily compressed clauses about outcome kinds make it harder to scan than it needs to be, but little is genuinely redundant.

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?

There is no output schema, so the description must carry the return-shape burden, and it does: ordering of notices, outcome kinds, minimum-received semantics, refund paths, cost breakdown, time estimate, validUntil, and signing order. Combined with the argument-boundary rules and sibling handoffs, an agent has everything needed to call it and interpret the result.

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?

With only 38% schema description coverage, the description does real work: it specifies amount as decimal strings in token units, tokens as listed symbols or contract addresses, that recipient defaults to the wallet, and that connection limits (pinned wallet, per-plan USD cap, listed tokens) bound every argument. It leaves maxSlippageBps entirely unexplained and never states that toChainId being optional is what distinguishes a single-chain swap from a bridge, which keeps it below a 5.

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 opening sentence names the specific verb ('Plans') and enumerates the exact resources: single-chain swap, cross-chain swap or bridge, and native-gas top-up, plus the supported chains and the fact that it returns unsigned transactions. The distinction from siblings is explicit (cleave_find_token for symbol ambiguity, cleave_track_swap for post-send tracking, cleave_get_gas for funding gas), so an agent can route without opening another schema.

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?

It states the triggering intent directly: 'It fits when the user wants to exchange tokens, move them between these chains, or get ETH, BNB or POL for gas.' Each sibling is assigned a condition ('For an ambiguous symbol, cleave_find_token lists the candidates; after sending, cleave_track_swap reports progress. A wallet with no gas can get it with cleave_get_gas'), which covers both when to use this tool and when to hand off.

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