Skip to main content
Glama

Crypto Bot Audit + Market Data (x402 paid)

How many transactions in a block

chain_tx_count
Read-onlyIdempotent

eth_getBlockTransactionCountByNumber for one block tag or height — the cheapest load/throughput reading of a chain that never has to move a full block header over the wire. Costs $0.001 USDC per call. Chains: base, ethereum, arbitrum, bsc, polygon, optimism, avalanche. Byte-identical to GET /chain/tx-count?chain=base&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]

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsNo
noteNo
chainNo
countNo
staleNo
caveatNo
reasonNo
sourceNo
chainIdNo
blockTagNo
chainLabelNo

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": {
      +    "blockTag": {
      +      "type": "string"
      +    },
      +    "caveat": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "chain": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "chainId": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "chainLabel": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "count": {
      +      "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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context: it is the cheapest load/throughput reading, costs $0.001 USDC per call, never moves a full block header over the wire, and is byte-identical to a REST endpoint. This goes beyond the annotations and helps an agent understand cost and performance implications. It doesn't mention rate limits or error cases, but the added cost/performance context justifies a 4.

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: it states the core operation first, then cost, chains, and REST equivalence. Every sentence earns its place, and there is no fluff. The structure is ideal for an agent scanning for purpose and constraints.

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?

Given the tool's simplicity (2 params, 1 required, output schema present), the description is nearly complete. It covers purpose, cost, supported chains, and equivalence to a REST endpoint. The only minor gap is that it doesn't describe the return value format, but the output schema exists and the description needn't explain return values. It also doesn't mention error conditions, but for a simple read-only count tool, this is acceptable.

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 schema already documents both parameters (chain and block) with their allowed values and defaults. The description adds the supported chain list and the default block tag, but these are also in the schema. The description doesn't add significant new meaning beyond the schema, so the baseline 3 is appropriate.

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 and resource: 'eth_getBlockTransactionCountByNumber for one block tag or height' — it clearly identifies what the tool does (counts transactions in a block) and distinguishes it from sibling tools like chain_block_txids or chain_tx_at_index. The title reinforces the purpose, and the description adds the RPC method name, making the operation unambiguous.

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 clear context: it is the 'cheapest load/throughput reading of a chain' and mentions supported chains and the equivalent REST endpoint. It doesn't explicitly say when NOT to use it or name an alternative tool, but the cost/performance framing implies when it is appropriate. Sibling names like chain_block_txids and chain_tx_at_index exist, but the description doesn't explicitly contrast with them, so it falls short of a 5.

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