Skip to main content
Glama
franckyo
by franckyo

Disassemble EVM bytecode

disassemble
Read-only

Convert EVM bytecode (from address or hex) into opcodes with program counters and flag invalid jump targets that cause reverts.

Instructions

Disassemble bytecode into opcodes with program counters. Supply either an on-chain address or a raw hex string. Crucially, this also validates statically-resolvable jump targets: a PUSH followed immediately by JUMP/JUMPI whose target is not a JUMPDEST will halt exceptionally at runtime (revert, all gas consumed). Those are reported separately as invalidJumps — a common intentional trap in CTF and puzzle contracts, and a real bug in hand-written assembly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNoChain name. One of: ethereum, sepolia, holesky, polygon, polygon-amoy, arbitrum, optimism, base, base-sepolia, bsc, avalanche, gnosis, scroll, lineaethereum
addressNoContract address to fetch and disassemble.
rpc_urlNoCustom JSON-RPC URL. Overrides `chain`; use for private or unlisted networks.
bytecodeNoRaw bytecode hex, as an alternative to address.
max_linesNoMax instructions to print.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses significant extra behavior: it validates statically-resolvable jump targets, reports invalid jumps separately as `invalidJumps`, and explains the runtime consequence (revert, all gas consumed). This is genuinely useful context that annotations do not convey.

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?

Three dense sentences with no filler: purpose, input modes, then the critical caveat about jump targets. The most important operational detail is front-loaded, and every sentence earns its place.

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?

There is no output schema, so the description carries the burden of explaining the return shape. It names 'opcodes with program counters' and the `invalidJumps` field, which is enough for an agent to call the tool and interpret results. It could specify the full response structure or error behavior, but overall completeness is strong.

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 100%, so the baseline is 3. The description adds meaning beyond the schema by clarifying that `address` and `bytecode` are alternative inputs and that bytecode is a 'raw hex string.' This helps disambiguate the optional parameters, though it does not detail every parameter.

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 description names a specific verb and resource: 'Disassemble bytecode into opcodes with program counters.' It also distinguishes the tool from siblings like get_bytecode (raw fetch) and decode_calldata (calldata decoding) by explicitly describing opcode-level output plus jump validation.

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 description gives clear invocation context: 'Supply either an on-chain address or a raw hex string.' This tells the agent the two valid input modes. It does not explicitly name when-not-to-use or alternative sibling tools, but the context is clear enough for a read-only disassembly task.

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