Skip to main content
Glama

Build revoke-approval tx

build_revoke_tx
Read-only

Unsigned transaction that sets an ERC-20 allowance to 0 (approve(spender, 0)) on an EVM chain. The user's wallet signs and sends it; SwapChan never signs. Use after check_approvals. Result includes display markdown with chan images: show it to the user. How to combine this with the other tools: swapchan_playbook (workflows: find-money, best-swap, rebalance, revoke-approvals, bridge-stuck, token-safety, recover-old-wallet).

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": {
      "chainId": "<chainId>",
      "token": "<token>",
      "spender": "<spender>"
    },
    "name": "build_revoke_tx"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYes
chainIdYesChain id (1, 8453, 42161, 10, 137, 56, 43114, 59144, 534352, 792703809 Solana, 8253038 Bitcoin, 728126428 Tron) or name (eth, base, arbitrum, optimism, polygon, bnb, avalanche, linea, scroll, solana, bitcoin, tron).
spenderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Adds real context beyond the annotations: the transaction is unsigned, the user's wallet signs and sends it, and SwapChan never holds keys. It also implies EVM-only scope, which matters since the schema lists Solana/Bitcoin/Tron chain ids. It doesn't discuss gas, failure modes, or expiry of the unsigned tx.

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?

Front-loads the core action in the first sentence and keeps the signing/display caveats tight. The trailing playbook list with seven workflow names is somewhat bulky, though it does route the agent.

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?

Covers signing responsibility, prerequisite tool, and the `display` markdown return value despite there being no output schema. However, it omits chain scope limits for the address params (Solana/Bitcoin/Tron chain ids in the schema would not work with a 0x pattern) and gives no guidance on how to present or pass the resulting unsigned tx onward.

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 only 33% (only chainId is described), so the description must compensate — and it does, explaining that token is the ERC-20 whose allowance is being reset and spender is the approval target receiving the 0 allowance. That meaning is not derivable from the bare address patterns in the schema.

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 precise verb and resource: builds an unsigned transaction that sets an ERC-20 allowance to 0 via approve(spender, 0) on an EVM chain. This clearly separates it from build_swap_tx, build_limit_order, and broadcast_tx among the siblings.

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?

'Use after check_approvals' gives an explicit prerequisite and sequencing, and naming the revoke-approvals workflow points at the right playbook. It stops short of naming the follow-on tool (e.g. broadcast_tx) or stating when not to use it, so the guidance is clear but not exhaustive.

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.