Skip to main content
Glama

Query a stream

query_stream
Read-onlyIdempotent

Read rows from a stream — raw (newest first), each entity's newest, or a rollup.

The result carries `restUrl`: this same request as a plain GET on the
public REST API, ready to put in an app.

Args:
    slug: The stream.
    node: The entity, whatever the stream calls it (node, zone, station, fuel).
        System-level streams have none.
    start: Inclusive, ISO-8601 or relative to now (-24h, -7d). UTC.
    end: Exclusive, same forms.
    interval: Bucket size — 5m, 15m, 1h, 1d, 7d, or all for one bucket.
        Absent means raw rows.
    agg: How a bucket is reduced.
    by: What a rollup splits by: a text column, or none for one series. Default the entity.
    where: Filters as column=value on text columns. Repeat a column for OR.
    search: column:text, a case-insensitive substring.
    vintages: latest is each interval's newest forecast; all keeps every publication.
    stamp: noon labels a daily bucket at noon UTC so its date reads right in US zones.
    newest: One reading per entity — each one's most recent interval, so "the price
        at every hub right now" is one call. Not with interval.
    limit: At most this many rows (1–2000).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNo
aggNoavg
endNo
nodeNo
slugYes
limitNo
stampNostart
startNo
whereNo
newestNo
searchNo
intervalNo
vintagesNolatest

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond that: the result carries a restUrl for the same request as a plain GET, the 'stamp' parameter's timezone rationale ('noon labels a daily bucket at noon UTC so its date reads right in US zones'), and the 'vintages' semantics (latest vs all publications). It doesn't describe pagination or error behavior, but for a read-only query tool with strong annotations, this is solid.

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?

The description is compact and front-loaded: the first sentence states the core purpose and modes, then the restUrl note, then a tight parameter list. Each parameter line earns its place with a meaningful semantic. It's slightly long (13 parameters) but that's proportionate to the tool's complexity. The only minor issue is that the parameter list is dense and could benefit from grouping (e.g., time parameters vs. aggregation parameters), but it's still highly scannable.

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?

For a 13-parameter read tool with an output schema present, the description is nearly complete. It explains the three query modes, the meaning of every parameter, the restUrl return value, and the timezone nuance. The output schema presumably documents the return shape, so the description doesn't need to. Minor gaps: no mention of pagination or how errors surface, and the 'agg' parameter's interaction with 'interval' is implied but not spelled out. Still, an agent has enough to call this correctly in most cases.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden — and it delivers. Every parameter is explained with concrete semantics: 'start: Inclusive, ISO-8601 or relative to now (-24h, -7d). UTC', 'interval: Bucket size — 5m, 15m, 1h, 1d, 7d, or all for one bucket. Absent means raw rows', 'where: Filters as column=value on text columns. Repeat a column for OR.' This goes well beyond the bare schema types and defaults, giving an agent the exact vocabulary and constraints needed to construct valid calls.

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 opens with a specific verb ('Read rows from a stream') and immediately distinguishes three modes: raw newest-first, per-entity newest, and rollup. It names the resource ('stream') and the key parameter (slug), and the sibling tools (describe_stream, list_streams) are clearly different operations, so an agent can tell this is the data-reading tool 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for when to use each mode (e.g., 'newest: One reading per entity — each one's most recent interval, so "the price at every hub right now" is one call. Not with interval.'). It doesn't explicitly say 'use describe_stream for metadata' or 'use list_streams to enumerate streams,' but the mode-level guidance is strong and the sibling names make the alternative obvious. It lacks an explicit when-not-to-use statement, so not 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