Skip to main content
Glama

onchain_query

PRIMARY tool for indexed on-chain stats/activity/totals — prefer this over raw RPC for chain data. Each op is a backend-agnostic intent: the query gateway selects the most accurate live source per field (indexed DB / pre-aggregated metrics / Data API), stamps every field (sources), and flags any caveat (warnings) — relay warnings to the user, never present a flagged value as exact. Pick an op and pass its params; chainId is an allowlisted EVM chain (43114 C-Chain, 43113 Fuji, + L1s). Lookback: hour-based ops (chainStatsRecent/chainActivity/addressActivity) max 720h (30 days); day-based ops (chainStatsSeries/contractStats/chainGasTotal/protocolRanking/contractGasFlow/topUnknownContracts) max 365 days — use a day-based op for windows over 30 days. Ops: chainStatsRecent {chainId, hours≤720} — tx count/gas/fees/active senders/avg gas price over the last N hours; chainStatsSeries {chainId, days≤365, bucket: hour|day|week|month} — bucketed time-series of the same; addressActivity {chainId, address, hours≤720, limit≤100} — tx count + recent sample for an address in a window; chainActivity {chainId, hours≤720, limit≤100} — tx count + recent sample chain-wide in a window; contractStats {chainId, contract, days≤365} — tx/unique-sender/gas totals for a contract; protocolRanking {chainId, contracts[≤25], days≤365, orderBy: txCount|gasUsed|uniqueSenders|feesPaidAvax, dir: asc|desc, limit≤100} — rank a set of contracts; contractGasFlow {chainId, contract, days≤365, limit≤100} — gas received/given per counterparty; topUnknownContracts {chainId, exclude[≤25], days≤365, limit≤100} — top contracts by gas excluding a set; chainGasTotal {chainId, days≤365} OR {chainId, fromDate, toDate} — total tx/gas/fees over N days or a YYYY-MM-DD range (≤365d). Note: C-Chain gasUsed is gas-target-regulated → ~stable day-to-day even as txCount varies (expected, not a bug).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesThe query operation
paramsYesOp-specific parameters (see description); validated server-side.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description discloses behavior: each op selects live sources, stamps sources, flags caveats, and requires relaying warnings. Also notes C-Chain gasUsed regulation. This goes beyond basic read/write expectations.

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

Conciseness3/5

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

Description is comprehensive but verbose; while well-structured with front-loaded purpose, it could be more concise given the length. Earns its detail but not a model of brevity.

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?

Complex tool with 9 ops; description covers all ops, parameters, lookback limits, and behavioral quirks. No output schema, but mentions return fields (sources, warnings). Complete enough for effective use.

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% but schema provides only minimal descriptions. The description compensates by detailing each op's parameters thoroughly, adding meaning beyond the schema's enum and nested object.

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?

Description clearly identifies as 'PRIMARY tool for indexed on-chain stats/activity/totals' and specifies it should be preferred over raw RPC, making the purpose and resource 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?

Explicitly guides to prefer this over raw RPC, provides lookback limits, and explains when to use day-based vs hour-based ops. However, it does not explicitly differentiate from sibling tools like chain_stats or onchain_activity.

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.

TDQS

B3.1/5.0
Disambiguation2/5

Many tools are redundant due to compatibility aliases (avalanche_docs_* vs docs_*, blockchain_get_* vs onchain_lookup) and overlapping functionality (chain_stats vs onchain_query, onchain_activity vs onchain_query ops, acp_list vs info_acps). Agents may struggle to select the correct tool when multiple appear to serve the same purpose, despite descriptions clarifying aliases.

Naming Consistency2/5

Naming patterns are inconsistent: some tools use noun_verb (acp_list, docs_fetch), some use verb_noun (build_plan), and others use prefixes like platform_get_, info_get_, and onchain_. The mix of styles (snake_case, noun phrases, verb phrases) makes it hard to predict tool names.

Tool Count2/5

With 48 tools, the count is high and inflated by compatibility aliases and granular platform_get_* wrappers. The scope spans multiple domains (docs, on-chain, platform API, ACPs, console), which could be better modularized. Many tools are trivial variants (e.g., platform_get_block vs platform_get_block_by_height) adding unnecessary bulk.

Completeness4/5

The server provides thorough read-only coverage for Avalanche: docs search, ACP management, on-chain lookups, indexed stats, platform API getters, and console flow guidance. While there is no transaction submission (likely intentional), the surface covers most queries a developer would need, with minor gaps like detailed token transfer history.