Skip to main content
Glama

Optimism is-contract check

op_is_contract
Read-only

Check whether a 0x address on Optimism 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=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85. 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.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds cost and failure semantics that annotations cannot express: malformed addresses return 400 uncharged, failed calls are free, $0.01/call via x402 USDC or card key, first 25 free. It also explains the otherwise puzzling idempotentHint=false by stating each call is charged so repeats are not free, and confirms 'reads or computes only and changes nothing.'

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 core purpose, then usage, then error/example, then pricing. Every sentence carries information, but the pricing tail is dense and the description runs long for a single-parameter read tool; slight trimming of the payment detail would improve scanability without losing meaning.

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 burden of describing return values, and it does: bytecode size, whether it is an EIP-1167 minimal proxy, and which implementation it points to. Combined with error and cost behavior, an agent has everything needed to call this correctly and interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with a single required 'address' string, so the baseline is 3. The description adds value beyond the schema by supplying a concrete example address and stating the rejection behavior for malformed input (400, uncharged), which tells the agent what format is acceptable and what happens on a bad value.

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 and resource ('Check whether a 0x address on Optimism is a smart contract or a plain wallet') and enumerates what the result contains: bytecode size, EIP-1167 minimal-proxy detection, and implementation address. The chain scoping ('on Optimism') clearly distinguishes it from the many sibling *_is_contract tools for other networks, and the proxy detail distinguishes it from a bare existence check.

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?

Gives an explicit when-to-use trigger ('before sending funds or approving a spender') and names an alternative for a different need ('for a fuller risk verdict use check_counterparty'). The agent can route between this and the sibling without opening any schema.

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