Skip to main content
Glama

swap_recover

Recover stablecoins stuck at a swap deposit address after an unfunded, failed, or refunded swap by sending them to your Arbitrum 0x address; the deposit address needs a little ETH for gas.

Instructions

Swap from a stablecoin: send the stablecoins sitting at its deposit address (unfunded, failed or refunded swap) to your own 0x address on Arbitrum. Needs a little Arbitrum ETH at the deposit address for gas (it says how much)

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": {
      "id": "<id>",
      "to": "<to>"
    },
    "name": "swap_recover"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
toYesyour 0x address on Arbitrum

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does real work: it discloses that funds are moved on Arbitrum, that gas in Arbitrum ETH must already sit at the deposit address, and that the error surfaces the required amount. It omits what happens on partial failure, whether the call is retryable, and what a successful response contains.

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?

Two compact sentences with the action and scope front-loaded and the gas prerequisite in a trailing parenthetical. Nothing is redundant and no sentence could be dropped without losing information.

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?

For a two-parameter fund-movement tool with no annotations and no output schema, the description covers the flow and the gas prerequisite well but leaves the 'id' identity, success/failure outcomes, and retry behavior unexplained. Adequate to attempt the call, not adequate to be confident about it.

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 only 50%: 'to' is documented as the Arbitrum 0x address, and the description reinforces that it must be your own address. The 'id' parameter is neither described in the schema nor identified in the description — whether it is a swap id or a deposit-address id is left to inference, which is a real ambiguity for a fund-moving call.

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 concrete action (send the stablecoins sitting at the deposit address to your 0x address on Arbitrum) and pins the exact scenario boundary: unfunded, failed or refunded swaps. That scenario language is what separates it from claim/fund/refund siblings without naming them, so an agent can recognize the rescue case immediately.

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?

The when-to-use condition is explicit (stablecoins stranded at a deposit address because a swap was unfunded, failed, or refunded) and the destination is fixed to your own address. It stops short of naming alternatives or stating when *not* to use it — e.g. that a funded/live swap should go through swap_claim or swap_status first.

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