Skip to main content
Glama

EVM code

evm_code
Read-onlyIdempotent

Use when you must know whether an address is a contract on Base, Ethereum, Arbitrum, Polygon or Optimism: is_contract, bytecode size, sha256 of the bytecode. Returns the exact paid x402 request for your input (GET /evm/code, $0.002 per call), with the response schema and an example; call that URL with an x402 or MPP client to get the data. Bad input is refused before any charge. With a P0 access key (header Authorization: Bearer p0k_…, buy one at https://x402-bazaar-rank.x402-bazaar-rank-worker.workers.dev/keys/buy?usd=5) this tool makes the paid call itself and returns the data, deducting the listed price.

Input Schema

NameRequiredDescriptionDefault
chainNoChain; default basebase
addressYes0x address (40 hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare read-only/idempotent/open-world but say nothing about payment. The description adds the crucial non-obvious behaviors: $0.002 per call, x402/MPP payment flow, refusal before charge on bad input, and the P0 access key path that auto-pays and deducts. That is substantial context beyond structured fields.

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?

Purpose and scope are front-loaded in the first clause, and the payment mechanics follow logically. It is a dense single paragraph that is longer than most, but every clause (pricing, error behavior, auth path) carries operational weight; only the embedded key-purchase URL is slightly noisy.

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?

For a tool with no output schema and a non-trivial payment wrapper, the description covers return fields, cost, error handling, authentication, and the two calling modes (raw request vs. auto-pay). An agent has enough to call it correctly without guessing.

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 (address pattern, chain enum with default) are fully documented in the schema. The description mentions chains and address semantics but adds no format or constraint detail beyond what the schema already provides, so baseline 3 applies.

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 the tool answers ('whether an address is a contract') and names the exact return fields (is_contract, bytecode size, sha256), plus the five supported chains. This clearly distinguishes it from sibling read tools like evm_erc20_balance, evm_nonce, or evm_block.

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 opening 'Use when you must know whether an address is a contract' gives an explicit triggering condition. It does not name alternatives or exclusions (e.g. when to prefer evm_erc20_balance for token checks), 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.

Resources