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.

Input Schema

TableJSON 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 already declare readOnly/idempotent/non-destructive/openWorld, but the description adds substantial context beyond them: a per-call price ($0.002), that it returns a paid x402 request rather than the data itself, that an x402 or MPP client is required to complete the fetch, and that bad input is refused before any charge. The cost and payment-requirement disclosures are exactly the kind of behavioral detail annotations cannot express.

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?

Front-loaded with the triggering condition, then outputs, then the payment mechanics. It is dense with no obvious filler, though the payment/client explanation makes it longer than a minimal definition would need.

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?

There is no output schema, so the description carries the return-value burden, and it does: it lists the returned fields and explains the two-step x402 payment flow and the pre-charge validation. An agent has everything needed to call it correctly.

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 description coverage is 100% and both parameters (address, chain enum) are fully documented in the schema, so baseline 3 applies. The description restates the chain list and implies the address input but adds no format or syntax beyond what the schema already carries.

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 verb+resource (check whether an address is a contract) and enumerates the exact outputs (is_contract, bytecode size, sha256 of bytecode) across five named chains. It is clearly distinguishable from siblings like evm_nonce, evm_erc20_balance, and evm_transaction, which cover different on-chain facts.

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 competing alternatives or when-not-to-use cases, so it stops short of a 5, but the context is clear.

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.