Skip to main content
Glama

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

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources