Skip to main content
Glama

get_chain_code

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x_paymentNoSigned x402 payment payload

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the underlying method (eth_getCode), the networks supported, and the payment aspect ('Live public RPC; one paid call'). This adds meaningful context about cost and external dependency. It does not describe error handling or rate limits, but for a simple read tool, the disclosed behaviors are sufficient.

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?

The description is two sentences plus a short question, front-loaded with the purpose. Every sentence adds value with no fluff or redundancy. It is appropriately sized for the tool's simplicity.

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

Completeness2/5

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

The tool is meant to check an address, but the input schema only contains x_payment, with no parameter for the address. The description does not explain how the target address is specified, making the tool difficult to invoke correctly. Despite the clear purpose and low complexity, this missing critical input is a significant gap that prevents the description from being complete.

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?

The schema has 100% description coverage for the single parameter x_payment, which is described as 'Signed x402 payment payload'. The description adds only a vague reference to 'one paid call', which does not provide additional semantic meaning beyond the schema. The baseline score is 3 because the schema already fully documents the parameter.

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?

The description clearly states the tool's function as checking whether an address is a smart contract or EOA by verifying bytecode existence and size via eth_getCode. It distinguishes itself from sibling tools by focusing on bytecode, which is unique among the chain-related tools. The question format immediately conveys the core purpose.

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?

The description provides clear context on when to use this tool: 'The safety/identity read wallet, payment and trading agents make before interacting with an address.' This implies the pre-interaction safety check use case. However, it does not explicitly mention alternatives or exclusions (e.g., when NOT to use it), so it falls short of a 5.

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.