Skip to main content
Glama

Polygon is-contract check

polygon_is_contract
Read-only

Check whether a 0x address on Polygon PoS is a smart contract or a plain wallet: bytecode size, and whether it is an EIP-1167 minimal proxy and which implementation it points to. Use before sending funds or approving a spender; for a fuller risk verdict use check_counterparty. A malformed address is rejected with 400, uncharged. Example: address=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
addressYes0x address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, destructiveHint=false, openWorldHint), the description discloses cost ($0.01/call, first 25 free), the billing channel (x402 USDC or card key), that failed/malformed calls are uncharged with a 400, and that repeats are billed again — which reinforces the idempotentHint=false annotation rather than contradicting it. It also explicitly states it 'changes nothing,' matching readOnlyHint.

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 is front-loaded, then usage, error handling, example, and pricing in a logical progression with no repeated content. The payment-channel detail (x402 USDC / card key / first 25 free) is somewhat dense for one sentence but is genuinely decision-relevant, so it earns its place.

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?

With one required parameter, full schema coverage, no output schema, and clear annotations, everything an agent needs is present: what is returned (bytecode size, proxy status, implementation), when to call it, error semantics, and cost. No output schema exists, so the description's return-value summary is an appropriate substitute.

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 'address' parameter, so the baseline is 3. The description adds a concrete example value and the failure behavior for a malformed address, but no format rule (checksum vs lowercase, length) beyond what the schema's '0x address' already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource with scope: 'Check whether a 0x address on Polygon PoS is a smart contract or a plain wallet,' and enumerates what the answer contains (bytecode size, EIP-1167 proxy status, implementation address). It separates itself from the risk-verdict sibling check_counterparty, but leaves its overlap with the listed polygon_proxy sibling unresolved, so an agent cannot fully rule out that tool from this text alone.

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

Usage Guidelines5/5

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

It gives an explicit decision context ('Use before sending funds or approving a spender') and an explicit alternative with the condition that selects it ('for a fuller risk verdict use check_counterparty'). This is exactly the when-to-use / when-to-use-something-else guidance the dimension asks for.

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