Skip to main content
Glama

Inspect EVM runtime bytecode (dev tool)

bytecode_inspect
Read-onlyIdempotent

Classify contract runtime code (eth_getCode hex): EIP-1167 minimal proxy + implementation, EIP-7702 delegation + delegate, EOF, size vs the EIP-170 24576-byte limit, code keccak-256, Solidity metadata (compiler, IPFS hash), notable opcode counts, and heuristic function-selector candidates. Pure, offline computation (blocktools); nothing is fetched or stored. 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": {
      "code": "<code>"
    },
    "name": "bytecode_inspect"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false, and destructiveHint=false. The description adds meaningful behavioral context beyond that: it is pure offline computation with nothing fetched or stored, and it itemizes the analytical outputs the agent will receive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first sentence is dense but front-loaded and informative. The second sentence about combining with swapchan_playbook lists unrelated workflows (find-money, best-swap, etc.) and does not directly help invoke bytecode_inspect, making it low-value padding.

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 and only one input parameter, the description carries the burden well by enumerating the classifications and derived data returned. It could be stronger on input constraints like the 59000-character maxLength, but overall it gives an agent enough to call and interpret the tool correctly.

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 description coverage is 0% and there is one required parameter, so the description must compensate. It does by specifying the parameter's expected format as eth_getCode hex, which is the key semantic detail an agent needs beyond the bare string type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ("Classify") and resource (contract runtime code), and enumerates the exact fields returned (EIP-1167, EIP-7702, EOF, EIP-170 size, keccak, metadata, opcodes, selectors). This makes the tool's function unmistakable, though it does not explicitly contrast itself with sibling inspection tools like contract_reader or evm_abi.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It clarifies the expected input is eth_getCode hex and that the operation is offline, which implies usage context. However, there are no explicit when-to-use/when-not conditions or direct alternatives named; the pointer to swapchan_playbook workflows is tangential rather than a routing rule.

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.