Skip to main content
Glama

BRAINIAC Base Chain Data

Get contract bytecode

chain-data_contract_code

Retrieve the bytecode of a smart contract on Base Mainnet at a specific address and optional block number. Price $0.02 USDC. POST /api/v1/chain-data/contract/code. Unpaid calls return 402 and do not run.

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": "chain-data_contract_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYes
blockNumberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose important traits: a fixed price of $0.02 USDC, the exact HTTP route, and that unpaid calls return 402 and do not execute. What it omits is what the response looks like and what happens when the address holds no code.

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?

Three short, front-loaded sentences: purpose first, then price and endpoint, then the payment failure mode. Every sentence carries information, though the raw route string is arguably redundant with the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only two parameters and no output schema, so the description should say something about the returned bytecode, such as its hex form or empty result for accounts without code. It covers payment and invocation behavior well but leaves the return value entirely unexplained.

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 0%, so the description has to add meaning, and it does clarify that address is the required target and blockNumber is optional. It adds no detail on the address format, block semantics, or defaults beyond what the schema already encodes through its pattern and bounds.

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: retrieve the bytecode of a smart contract at a given address and optional block number on Base Mainnet. That is unambiguous about what operation is performed, but it never distinguishes this from nearby siblings such as chain-data_contract_read or chain-data_address_nonce.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over the contract-read or address tools; usage is only implied by the phrase 'retrieve the bytecode'. No prerequisites or exclusions are given, so the agent must infer the selection criteria.

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