Skip to main content
Glama

chain_stats

Chain statistics from the Avalanche Stats API (pre-aggregated; closed periods only, so the current hour or day is not included). target=chain: tx count, gas used, fees paid and average gas price over the last hours (window=recent, max 720h = 30 days), or a time-series that also has active senders (window=series, days max 365; timeInterval=hour max 90 days). target=network: current P-chain validator snapshot. There are no per-contract stats here; for those, run SQL in the Builder Hub explorer Query page. Note: C-Chain gasUsed is gas-target-regulated, so daily gas is about stable even as tx count varies. That is expected, not an error.

Input Schema

NameRequiredDescriptionDefault
daysNoLook-back days for window=series (default: 30, max 365; max 90 with timeInterval=hour)
hoursNoLook-back hours for window=recent (default: 24, max 720)
targetNochain (default) | network
windowNochain: recent aggregate (default) or series
chainIdNoEVM chain ID (default: C-Chain for the network)
networkNoNetwork (default: mainnet)
timeIntervalNoBucket size for window=series (default: day)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / days / description
      Previous value: -"Look-back days for series / contract (default: 30, max 365)"New value: +"Look-back days for window=series (default: 30, max 365; max 90 with timeInterval=hour)"
    • changedInput schema / properties / target / description
      Previous value: -"chain (default) | contract | network"New value: +"chain (default) | network"
    • changedInput schema / properties / target / enum
      Previous value: -[
      -  "chain",
      -  "contract",
      -  "network"
      -]New value: +[
      +  "chain",
      +  "network"
      +]
    • removedInput schema / properties / value
      Removed value: -{
      -  "description": "Contract address (target=contract)",
      -  "type": "string"
      -}
  2. Added

TDQS

A4.5/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 burden and mostly delivers: it discloses that data is pre-aggregated and excludes closed periods only (current hour/day missing), gives numeric caps, and preempts the gas-target-regulated stable-gas 'looks like an error' confusion. It does not state auth requirements or return shape, but the caveats cover the main behavioral risks.

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 but front-loaded: it leads with the source and closed-period constraint before the two target modes. Every sentence carries information (limits, caveats, routing). Marginally long, but nothing is wasteful.

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?

No output schema and no annotations, so the description must cover behavior and it does: modes, limits, field sets, and the gas caveat. Return value structure is implied rather than specified, but for a stats tool with a fully-described schema this is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds cross-parameter constraints the schema only hints at: which window each of hours/days applies to and the max-90-days interaction with timeInterval=hour. It reinforces defaults for target and window meaningfully rather than merely restating them.

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+resource (chain statistics from the Avalanche Stats API) and cleanly separates the two modes: target=chain returns tx count, gas, fees, avg gas price, while target=network returns the P-chain validator snapshot. It also names what it is not (no per-contract stats), routing the agent to the Query page, which distinguishes it from siblings.

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?

Explicit when-to-use rules: window=recent vs series is defined with the exact fields each returns, limits are given (720h, 365 days, 90 days with timeInterval=hour), and the per-contract exclusion names the alternative. An agent can pick the right mode without opening the schema.

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.