Skip to main content
Glama

EVM & Solana Chain Reads (Tanod)

get_contract_code

Read-onlyIdempotent

chainpeek: Get the deployed bytecode size and hash of an address, with EIP-1167 and EIP-7702 detection. For other proxy kinds use detect_proxy. Returns what is deployed at an address. Only EIP-1167 clones and EIP-7702 delegations are detected. A delegated wallet is not a contract. Ethereum, Base and Robinhood only. Read-only. A bad address is a 422 (not charged). Typically under 1 s. Price: USD 0.001. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/ethereum-rpc-reads-api.html

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

Input Schema

NameRequiredDescriptionDefault
chainYesethereum, base or robinhood (Robinhood Chain, chain id 4663).
addressYesAccount or contract address (0x + 40 hex).

Output Schema

NameRequiredDescriptionDefault
kindNo
noteNo
blockNo
chainNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
addressNo
code_hashNo
code_sizeNo
code_prefixNo
is_contractNo
eip7702_delegateNo
is_eip1167_proxyNo
is_eip7702_delegatedNo
code_prefix_truncatedNo
eip1167_implementationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / address / title
      Removed value: -"Address"
    • removedInput schema / properties / chain / title
      Removed value: -"Chain"
    • removedInput schema / title
      Removed value: -"get_contract_codeArguments"
  2. Changed2 schema fields changed
    • changedInput schema / properties / chain / description
      Previous value: -"ethereum or base."New value: +"ethereum, base or robinhood (Robinhood Chain, chain id 4663)."
    • changedInput schema / properties / chain / enum
      Previous value: -[
      -  "ethereum",
      -  "base"
      -]New value: +[
      +  "ethereum",
      +  "base",
      +  "robinhood"
      +]
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent and non-destructive, yet the description still adds value beyond them: the 422-on-bad-address error with no charge, typical latency under 1 s, price of USD 0.001, and the 10-free-reads-per-IP-per-day quota. These are exactly the cost and failure-mode facts an agent needs before calling a metered endpoint.

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?

Front-loaded with purpose and the sibling hand-off, then packs error, latency, price and quota into short fragments with no filler. The telegraphic style borders on a run-on list, but every clause carries operational information rather than restating structured fields.

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

Completeness5/5

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

With an output schema present the description needn't explain return values, and it fills the remaining gaps a thin tool definition would leave: detection scope, chain coverage, billing, quota, error semantics and latency. Nothing an agent needs to invoke this metered, chain-restricted read is missing.

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 coverage is 100% and both parameters carry descriptions, so the schema already documents `chain` (enum of three chains) and `address` (0x + 40 hex). The description's chain restriction largely repeats the enum and adds no new detail on argument format or effects, so this sits at the baseline for a fully documented schema.

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 ('get the deployed bytecode size and hash of an address') plus the two detection modes (EIP-1167, EIP-7702), and explicitly names the sibling it is not (detect_proxy). An agent can separate this from detect_proxy and get_verification_code without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit routing advice ('For other proxy kinds use detect_proxy') and two crisp exclusions that change the decision: only EIP-1167 clones and EIP-7702 delegations are detected, and a delegated wallet is not a contract. It also bounds the tool to three chains, so the agent knows when the tool does not apply at all.

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.