Skip to main content
Glama

Crypto Bot Audit + Market Data (x402 paid)

Was this a contract at that block?

chain_code_at
Read-onlyIdempotent

eth_getCode at a historical block, compared against today: bytecode present then, size at both points, and whether the code changed since. The check for 'what did this address look like when I traded'. Costs $0.001 USDC per call. Chains: base, ethereum, arbitrum, bsc, polygon, optimism, avalanche. Byte-identical to GET /chain/code-at?chain=base&address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&block=latest.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
blockNoblock number or latest|safe|finalized|earliest|pending (default "latest")
chainYeschain key: base, ethereum, arbitrum, bsc, polygon, optimism, avalanche [required]
addressYestarget address, 0x + 40 hex [required]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsNo
noteNo
blockNo
chainNo
staleNo
caveatNo
reasonNo
sourceNo
addressNo
chainIdNo
chainLabelNo
codePrefixNo
blockNumberNo
bytecodeSizeNo
changedSinceNo
isContractNowNo
existedAtBlockNo
latestBytecodeSizeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "address": {
      +      "type": "string"
      +    },
      +    "block": {
      +      "type": "string"
      +    },
      +    "blockNumber": {
      +      "type": "integer"
      +    },
      +    "bytecodeSize": {
      +      "type": "integer"
      +    },
      +    "caveat": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "chain": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "chainId": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "chainLabel": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "changedSince": {
      +      "type": "boolean"
      +    },
      +    "codePrefix": {
      +      "type": "string"
      +    },
      +    "existedAtBlock": {
      +      "type": "boolean"
      +    },
      +    "isContractNow": {
      +      "type": "boolean"
      +    },
      +    "latestBytecodeSize": {
      +      "type": "integer"
      +    },
      +    "note": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "stale": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "ts": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, openWorld, and non-destructive. The description adds valuable non-obvious behavior: the $0.001 USDC cost per call, supported chains, comparison-to-today semantics, and the byte-identical REST endpoint. This goes beyond what annotations alone provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded: function first, then use case, cost, chains, and REST mapping. Every sentence earns its place, and there is no redundancy with the structured schema.

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?

Given an output schema exists and annotations fully cover the safety profile, the description supplies everything needed for correct selection and invocation: purpose, cost, supported chains, parameter format via example, and exact REST behavior. No critical practical detail appears missing.

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%, so the baseline is 3. The description reinforces the historical-block meaning and provides a concrete example query, but it does not add meaningful per-parameter semantics beyond what the schema already documents.

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?

The description states a precise function: historical eth_getCode compared against today, and explicitly lists the outputs (bytecode present then, size at both points, change flag). This clearly distinguishes it from sibling tools like chain_code (current code) or chain_contract_diff.

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 description gives a concrete use case: 'what did this address look like when I traded', which tells an agent when this historical comparison is appropriate. It does not name sibling alternatives or state when not to use it, but the context is clear enough for selection.

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