Skip to main content
Glama

chain_decode_revert

Read-only

Revert reason decoder — Decode EVM revert data offline: Error(string) reasons, Panic(uint256) codes with meaning, and ~100 common custom errors (OpenZeppelin v5 ERC20/721/1155/Ownable/AccessControl, Uniswap Universal Router and v4, Permit2, ERC-4337 EntryPoint, Safe), including nested ExecutionFailed/WrappedError data, plus a category (INSUFFICIENT_BALANCE, MISSING_APPROVAL, SLIPPAGE, DEADLINE, NOT_AUTHORIZED...) and a fix. Param: data (0x revert hex); optional errors=Name(type,type);Other(type) to add the contract's own error signatures. Price: $0.002 USDC (Base, via x402).

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": {
      "data": "<data>"
    },
    "name": "chain_decode_revert"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002645524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63650000000000000000000000000000000000000000000000000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered; the description adds genuinely new facts: decoding happens offline (no RPC), output includes a semantic category and a suggested fix, nested ExecutionFailed/WrappedError payloads are unwrapped, and the call costs $0.002 USDC via x402. The paid/x402 requirement is exactly the kind of non-obvious constraint worth surfacing. It omits what happens on undecodable or unknown-selector input.

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 is front-loaded in the first clause, followed by supported error families, output shape, and param/pricing notes. The single dense sentence is long but each clause carries distinct information; only the exhaustive vendor list is mildly bloated, and nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly takes on the burden of describing returns: decoded reason, panic code meaning, category enum examples, and a fix. Combined with the documented errors param, an agent has what it needs to call it, though failure/unknown-error behavior is unstated.

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?

The description adds meaning beyond the schema: it labels data as "0x revert hex" and — importantly — documents an optional errors=Name(type,type);Other(type) parameter with its exact signature syntax that is absent from the input schema entirely. That is real compensating value, though the data payload is still only illustrated by an example blob rather than characterized in text.

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 ("Decode EVM revert data") and enumerates the exact input classes it handles: Error(string), Panic(uint256), and ~100 named custom error sets (OpenZeppelin v5, Uniswap, Permit2, ERC-4337, Safe). An agent can immediately tell this handles revert payloads rather than calldata or logs, distinguishing it from the decode_* 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: it operates "offline" on 0x revert hex, and the errors param exists for adding a contract's own error signatures, which implies the case where a custom error is not in the built-in table. No explicit when-not or named alternative (e.g., chain_decode_calldata) is given, so it stops short of full routing guidance.

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