Skip to main content
Glama

Buy one on-chain fact about a Base contract

buy_contract_data
Idempotent

Paid over x402 in USDC on Base, from 0.0049 per call. Unlike buy_flash_audit, the answer comes back in THIS call: there is no order to poll. Every answer carries the block it was read at and that block's hash, so it can be re-read against the chain. Call contract_data_catalog first for the list and prices. Without a payment in _meta["x402/payment"] it returns the PaymentRequired document, followed by what can be done for free without a wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productYesWhich fact to buy. See the catalog tool.
targetAddressNoContract or token address on Base mainnet (eip155:8453). Required for every product whose catalog entry says needsTargetAddress=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "if": {
      +      "properties": {
      +        "product": {
      +          "not": {
      +            "const": "estado-cadena"
      +          }
      +        }
      +      },
      +      "required": [
      +        "product"
      +      ]
      +    },
      +    "then": {
      +      "required": [
      +        "targetAddress"
      +      ]
      +    }
      +  }
      +]
    • changedInput schema / properties / targetAddress / description
      Previous value: -"Contract or token address on Base mainnet (eip155:8453). Optional: when omitted, the answer is about the product's `defaultTargetAddress` from the catalog."New value: +"Contract or token address on Base mainnet (eip155:8453). Required for every product whose catalog entry says needsTargetAddress=true."
  2. Changed1 schema field changed
    • changedInput schema / properties / targetAddress / description
      Previous value: -"Contract or token address on Base mainnet (eip155:8453). Required by every product except the ones the catalog marks `needsTargetAddress: false`."New value: +"Contract or token address on Base mainnet (eip155:8453). Optional: when omitted, the answer is about the product's `defaultTargetAddress` from the catalog."
  3. Changed2 schema fields changed
    • changedInput schema / properties / targetAddress / description
      Previous value: -"Contract or token address on Base mainnet (eip155:8453)."New value: +"Contract or token address on Base mainnet (eip155:8453). Required by every product except the ones the catalog marks `needsTargetAddress: false`."
    • changedInput schema / required
      Previous value: -[
      -  "product",
      -  "targetAddress"
      -]New value: +[
      +  "product"
      +]
  4. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate non-read-only, non-destructive, and idempotent behavior. The description adds meaningful context beyond that: payment is required, results are returned synchronously, each result includes block and hash for verification, and missing payment yields a PaymentRequired document. It does not contradict annotations, but could additionally mention rate limits or precise failure modes.

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?

Every sentence earns its place: pricing, synchronous behavior, verifiability, catalog prerequisite, and payment failure mode are all packed into a compact paragraph. The most important differentiator (unlike buy_flash_audit) is front-loaded, and no redundant filler exists.

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

Completeness4/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 reasonably explains what the response will look like (result with block and hash, or PaymentRequired document). It also covers prerequisites and free alternatives. Some ambiguity remains about the exact structure of the returned fact and how to interpret the free options, but the description is solid for a paid tool with a catalog companion.

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 both parameters are well-documented in the schema (product enum and targetAddress pattern/conditional requirement). The description adds only minor semantic value by pointing to the catalog for prices and product details, and by clarifying that payment is passed via _meta rather than as a schema parameter. This meets the baseline but does not greatly exceed it.

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 specific verb-resource pair ('buy one on-chain fact about a Base contract') and immediately differentiates itself from buy_flash_audit by highlighting the synchronous response model. An agent can clearly determine this tool purchases a discrete fact rather than launching an async audit.

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?

The description explicitly says to call contract_data_catalog first for product list and pricing, and contrasts with buy_flash_audit by noting there is no order to poll. It also mentions the payment prerequisite through _meta['x402/payment'], giving clear when-to-use and prerequisite guidance.

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