Skip to main content
Glama

Berachain is-contract check

bera_is_contract
Read-only

Check whether a 0x address on Berachain is a smart contract or a plain wallet: bytecode size, whether it is an EIP-1167 minimal proxy and which implementation it points to, and whether it is a wallet that delegates to contract code (EIP-7702; delegatedTo names the code, isContract stays false). 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=0x549943e04f40284185054145c6E4e9568C1D3241. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>"
    },
    "name": "bera_is_contract"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYes0x address

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=true; the description reinforces this ('reads or computes only, changes nothing') and crucially explains the idempotentHint=false oddity by stating each call is charged so repeats are not free. It also discloses pricing tiers (first 10 free, $0.01/call, failed calls free) and the 400-uncharged behavior for a malformed address. Return-shape disclosure is moderate (it names the semantic fields but not exact keys or formatting), so this is solid but not exhaustive.

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 check and its output semantics, then caveats, then alternative, then pricing. Dense but almost every clause carries decision-relevant information (7702 behavior, 400-uncharged, sibling alternative, first-10-free). The trailing pricing sentences could be consolidated into one, which keeps it from a 5.

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 no output schema, the description carries the return-value burden and does so by naming the meaningful results (bytecode size, minimal proxy + implementation, delegatedTo with isContract=false). For a one-parameter read-only check, nothing an agent needs to select or call it correctly is missing.

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?

Only one parameter and the schema already describes it at 100% coverage ('0x address'), so the baseline is high regardless. The description still adds value by supplying a concrete example address and stating that a malformed address is rejected with 400 without charge, which tells the agent the expected format matters and the failure mode is safe.

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?

Names a specific verb and resource (check whether a 0x address on Berachain is a contract or wallet) and enumerates the outputs it discriminates: bytecode size, EIP-1167 proxy status plus implementation, and EIP-7702 delegation. That scope clearly separates it from the sibling chain variants (eth_is_contract, arb_is_contract) and from bera_proxy/bera_token_info.

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 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 EIP-7702 caveat also tells the agent when this tool's answer may look surprising, which is a real usage condition rather than filler.

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