Skip to main content
Glama
Ethereum MCP
by ETHCF

get_code

Retrieve contract bytecode for any address; returns 0x when the address is not a contract. Use it to verify contract existence or inspect deployed code.

Instructions

Get bytecode at an address. Returns 0x if not a contract.

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": {
      "address": "<address>"
    },
    "name": "get_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainNoChain name or ID (default: ethereum)
addressYesAddress (0x...)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the sentinel behavior 'Returns 0x if not a contract,' but it does not cover chain handling, caching, error behavior, or response shape, leaving meaningful gaps for an unannotated tool.

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?

Two short sentences with no wasted wording. The core action is front-loaded, and the non-contract return behavior is appended efficiently.

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?

This is a simple read-only lookup with two fully described parameters and no output schema. The description covers what the tool returns in the not-a-contract case, which is the main ambiguity; only minor operational details are absent.

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 both the address and chain parameters, including the default chain. The description adds no parameter-level meaning beyond the schema, making the baseline 3 appropriate.

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 states a specific verb and resource: 'Get bytecode at an address.' This is clearly distinguishable from data-listing siblings, but it does not name or contrast any alternative tool, so it stops short of full sibling differentiation.

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?

Usage is only implied: an agent can infer to call this when it needs contract bytecode. The description gives no explicit when-to-use, when-not-to-use, or alternative-tool guidance, so the agent must infer selection from the tool name and purpose.

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

Deploy Server

Other Tools