Skip to main content
Glama

AgentPay — trust routing + spend caps for x402 agents

dune_query

Read-only

Run any Dune Analytics query and return live onchain results by query ID. Use fast_only=True for live bots — returns cached result instantly or raises immediately, never blocks.

Use when: You need deep onchain analytics from a specific Dune query — protocol revenue, user counts, custom metrics. Not for: you have no Dune query ID — the other tools cover prices, derivatives, TVL and security without one; you need sub-second answers — set fast_only=true or use a cached tool. Returns: rows[], columns[], row_count, generated_at from the Dune Analytics query result Example response: {"query_id":3810512,"row_count":2,"columns":["protocol","revenue_usd"],"rows":[{"protocol":"Uniswap V3","revenue_usd":1243800},{"protocol":"Aave V3","revenue_usd":987200}],"generated_at":"2026-03-22T00:00:00Z","source":"dune"}

Price: $0.000 USDC per call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum rows to return (default 25)
query_idYesDune Analytics query ID (visible in the query URL)
fast_onlyNoIf True, return cached result immediately or raise — never execute a fresh query. Use for live bots where latency matters. Default: False.
query_parametersNoOptional named parameters to pass to the Dune query

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description goes well beyond them, disclosing that fast_only returns cached data or raises immediately and never blocks, and that each call has a price. Those are latency and cost behaviors the annotations cannot express.

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?

Bulleted 'Use when / Not for / Returns / Example response' structure is front-loaded and skimmable. The embedded example JSON is somewhat verbose for a tool with no output schema, but it earns its place by showing the exact return shape.

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?

Covers purpose, exclusions, latency semantics, return fields, a concrete example response, and cost. With no output schema present, the description supplies the return contract itself, so nothing an agent needs to call and interpret this tool is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds selecting guidance for fast_only ('for live bots') that maps the parameter to a concrete use case rather than restating its type. query_parameters nesting is the only element left purely to the schema.

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 ('Run any Dune Analytics query ... by query ID') and immediately distinguishes itself from siblings by noting that alternatives cover prices, derivatives, TVL and security without a query ID. An agent can tell it apart from token_price or defi_tvl without opening any 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?

Explicit 'Use when' and 'Not for' blocks name the selecting condition (no Dune query ID) and the latency fallback (fast_only=true or a cached tool). This is exactly the when/when-not/alternatives structure the rubric reserves for 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.