Skip to main content
Glama

chain_code

Read-only

Contract or wallet? (bytecode check) — Is an address a contract, a plain EOA or an EIP-7702 delegated EOA? Returns bytecode size, SHA-256 code hash, EIP-1167 clone implementation and 7702 delegate (address=). Chains: base (default), ethereum, arbitrum, optimism, polygon via chain=. Price: $0.002 USDC (Base, via x402).

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": "chain_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainYesbase
addressYes0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior the annotations do not: a per-call price of $0.002 USDC via x402 on Base, and the supported chain set. It stops short of saying what happens for an invalid or empty address.

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?

Densely front-loaded: purpose first, then return fields, then chains, then price. Slightly telegraphic fragments such as '7702 delegate (address=)' take a moment to parse, but nothing is wasted.

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, the description correctly enumerates the returned values, and it discloses cost and chain coverage — the key facts for a paid open-world read. Remaining gaps are edge-case behavior (no-code address, invalid hex) which are minor for a lookup tool.

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?

The schema technically has descriptions for both params, but they are only example values ('base' and a sample 0x address) with no enum. The description compensates by enumerating the accepted chains (base, ethereum, arbitrum, optimism, polygon) and stating base is the default via chain=, which is real meaning beyond the 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 question ('Is an address a contract, a plain EOA or an EIP-7702 delegated EOA?') plus the mechanism (bytecode check) and the exact return fields (bytecode size, SHA-256 code hash, EIP-1167 clone implementation, 7702 delegate). An agent can distinguish this from chain_call, chain_proxy, or chain_storage 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 Guidelines3/5

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

The framing 'Contract or wallet?' implies when the tool applies, but there is no explicit when-to-use/when-not guidance and no named alternative among the chain_* siblings. Usage must be inferred from the purpose statement alone.

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.

Resources