Skip to main content
Glama

get_chain_code

Read-only

Is an address a smart contract or a regular wallet (EOA)? Returns whether deployed bytecode exists and its size via eth_getCode, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The safety/identity read wallet, payment and trading agents make before interacting with an address. Live public RPC; one paid call.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_chain_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
x_paymentNoSigned x402 payment payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the description earns credit for the operational facts they omit: the read hits a live public RPC and costs one paid call, which materially affects an agent's decision to invoke it. It also discloses the exact return semantics (boolean bytecode existence plus size) despite there being no output schema.

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?

Four tight sentences with no filler: the question form front-loads the purpose, then mechanism, then use case, then operational cost. Every clause carries information an agent needs.

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 spells out what is returned, and it covers cost, transport, and chain coverage for a one-parameter read tool. The one unresolved hole is the address input, which is neither in the schema nor explained in prose.

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% for the single x_payment parameter, so the baseline is 3; the phrase "one paid call" usefully links the invocation cost to that payment payload. However, the description frames the tool around "an address" while the input schema exposes no address property, leaving the agent without an explanation of how the target address is supplied.

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?

Opens with a precise question form ("Is an address a smart contract or a regular wallet (EOA)?") and names the mechanism (eth_getCode) and the returned signal (bytecode existence and size). The scope list of six chains makes it trivially distinguishable from siblings like chain_token_identity or get_crypto_address_risk.

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

Usage Guidelines4/5

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

States the usage context explicitly: it is "the safety/identity read wallet, payment and trading agents make before interacting with an address," which tells the agent this is a pre-interaction check. It stops short of naming an alternative tool or a when-not-to-use condition, so it falls just below the top band.

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.