Skip to main content
Glama

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

Track a planned swap or transfer

cleave_track_swap
Read-onlyIdempotent

Reports the status of a swap, bridge or gas top-up that was planned with cleave_plan_swap and then sent, or ordered with cleave_get_gas: its state (for example pending, in flight, delivered, refund pending or refunded), what arrived against the plan and on which chain, and the next action or when to check again. It takes the chain and transaction hash, plus the plan's requestId when known, or for a gas top-up the requestId alone; a transaction to a contract outside Cleave's published list is reported as such. It fits when the user asks whether such a transfer arrived, and before any re-send, because re-sending a plan that is still in flight can pay twice. It reports states only and returns no transactions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cleave_track_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
txHashNoThe transaction hash, also while it is pending; required unless requestId is a gas order's, in g:<chainId>:<orderHash> form
chainIdNoThe chain the transaction was sent on; required unless requestId is a gas order's, in g:<chainId>:<orderHash> form
requestIdNoThe requestId of the plan, used to compare the transaction with it, or of a gas order, in g:<chainId>:<orderHash> form, which is enough alone

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / chainId / description
      Added value: +"The chain the transaction was sent on; required unless requestId is a gas order's, in g:<chainId>:<orderHash> form"
    • addedInput schema / properties / requestId / description
      Added value: +"The requestId of the plan, used to compare the transaction with it, or of a gas order, in g:<chainId>:<orderHash> form, which is enough alone"
    • addedInput schema / properties / txHash / description
      Added value: +"The transaction hash, also while it is pending; required unless requestId is a gas order's, in g:<chainId>:<orderHash> form"
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the description goes further: it enumerates the possible states, discloses the edge case where a tx targets a contract outside Cleave's published list, and states the output boundary ('reports states only and returns no transactions'). The double-payment warning is behavioral context the annotations cannot express.

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 sibling dependency are front-loaded, and nearly every clause carries non-redundant information. It is dense and runs long, with an inline state list that could have been trimmed, but there is no 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?

There is no output schema, and the description compensates fully by describing what is returned: current state, what arrived versus the plan and on which chain, and the next action or when to check again. Combined with the stated state vocabulary, an agent has everything needed to call and interpret the result.

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 description coverage is 100%, so the baseline is a 3. The description restates the argument combination (chain and txHash, plus requestId when known, or requestId alone for a gas top-up) at a slightly higher level than the schema, but adds no format or validation detail beyond what the per-parameter descriptions already say.

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: reports the status of a swap, bridge or gas top-up. It explicitly ties the object to the two tools that create it (cleave_plan_swap, cleave_get_gas), so the agent can distinguish it from all three siblings without opening a 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?

Gives an explicit when-to-use condition ('the user asks whether such a transfer arrived') and a critical when-not/precondition ('before any re-send... re-sending a plan that is still in flight can pay twice'). It also names the upstream alternatives that must run first, which is exactly the routing information an agent needs.

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.