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. A first read of an address can take up to 60s: keep the connection open. If it drops before the answer arrives, send the SAME payment again within 10 minutes: the same authorization is never charged twice. 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. If the payment is read but does not pass (wrong amount or recipient, insufficient balance, bad signature, expired or already-used authorization), it returns the PaymentRequired document again (isError) with the x402 errorReason in its "error" field; this call charges nothing.

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.6/5.0
Behavior5/5

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

Adds rich context beyond annotations: the x402/USDC payment model, first-read latency up to 60s with an instruction to keep the connection open, safe retry semantics (same authorization never charged twice), the PaymentRequired response when unpaid or when payment fails with the x402 errorReason, and proof-of-read via block number and hash. Annotations cover readOnly/idempotent flags, but the description supplies the operational detail those flags cannot.

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?

Dense and front-loaded with the most decision-relevant facts (payment, synchronous return, retry policy), and every sentence carries operational weight. It is on the longer side, but the length is justified by the payment and error-handling complexity.

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?

For a paid tool with no output schema, the description still explains what comes back (the fact plus the block and block hash) and how failures surface (PaymentRequired document with isError and errorReason). Nothing an agent needs to invoke it correctly or interpret responses is 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 enum values and targetAddress regex are already fully documented in the schema. The description only points to the catalog tool for the price list and does not add syntax or meaning beyond what the schema provides, which is the expected baseline.

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 ('Buy one on-chain fact about a Base contract') and immediately distinguishes itself from the sibling buy_flash_audit by noting the answer returns in this call rather than requiring a poll. An agent can differentiate it from check_contract_free and buy_flash_audit without opening the schema.

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?

Explicitly directs the agent to call contract_data_catalog first for the list and prices, and contrasts its synchronous behavior with buy_flash_audit. It also documents the retry condition (resend the SAME payment within 10 minutes) and the free-path fallback, leaving little to inference.

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