Skip to main content
Glama
franckyo
by franckyo

Fetch deployed bytecode

get_bytecode
Read-only

Fetch deployed runtime bytecode for any EVM contract address and get its hex and size. Detect empty results to identify EOAs or addresses without code.

Instructions

Fetch a contract's deployed runtime bytecode via eth_getCode. Returns size and hex. Empty result means the address is an EOA or has no code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockNoBlock tag or number. Default 'latest'.
chainNoChain name. One of: ethereum, sepolia, holesky, polygon, polygon-amoy, arbitrum, optimism, base, base-sepolia, bsc, avalanche, gnosis, scroll, lineaethereum
addressYesContract address (0x...)
rpc_urlNoCustom JSON-RPC URL. Overrides `chain`; use for private or unlisted networks.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint and openWorldHint. The description adds behavioral detail beyond annotations: it invokes eth_getCode, returns size and hex, and explains that an empty result means the address is an EOA or has no code.

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 short sentences front-load the action and resource, then add return shape and an important edge-case interpretation. No wasted words or redundant restatement of schema fields.

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?

For a read-only tool with complete schema descriptions and no output schema, the description covers core invocation and return interpretation. It could specify the exact representation of 'size and hex' more precisely, but that is a minor gap.

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 description coverage is 100%, so the schema already documents all parameters. The description adds no extra parameter-level guidance, leaving the baseline of 3 appropriate.

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 uses a specific verb ('Fetch') and resource ('contract's deployed runtime bytecode'), names the underlying method eth_getCode, and notes return content and empty-result meaning. This clearly distinguishes it from siblings like read_storage or disassemble.

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?

The purpose implies when to use it: when you need deployed runtime bytecode. However, it does not explicitly contrast it with sibling tools such as disassemble or eth_call, nor does it state when not to use it.

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