Skip to main content
Glama
GSA-TTS

mcp-server-eia

by GSA-TTS

Query EIA dataset data

eia_get_data
Read-only

Filter and page through EIA dataset rows by specifying route, data columns, facets, and date range, with sorting options.

Instructions

Query rows from an EIA dataset with filtering, sorting, and paging.

Returns a structured payload: { "route", "frequency", "description", "total": , "offset", "length", "returned": , "has_more": , "next_offset": <int | None>, "data": [ {row}, ... ], "warnings": [ ... ] # present only when relevant }

Workflow: use eia_browse_routes to find the route, its valid data_columns, frequencies, and facet ids; use eia_get_facet_options for valid facet values; then call this tool. If data columns are wrong the API may return empty rows, so verify columns against the metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoInclusive end period, same format as `start`.
dataYesData columns to return, e.g. ['revenue', 'sales', 'price']. Valid columns are listed in the dataset metadata from eia_browse_routes (the 'data_columns' field). At least one column is usually required for the API to return values.
sortNoSort spec, e.g. [{'column': 'period', 'direction': 'desc'}]. 'direction' is 'asc' or 'desc'.
routeYesLeaf dataset route to query, e.g. 'electricity/retail-sales'. Discover with eia_browse_routes.
startNoInclusive start period. Format must match the dataset frequency, e.g. '2020' (annual), '2020-01' (monthly), '2020-01-01' (daily), '2020-01-01T00' (hourly).
facetsNoFacet filters as {facet_id: [values]}, e.g. {'stateid': ['CA'], 'sectorid': ['RES']}. Discover facet ids with eia_list_facets and valid values with eia_get_facet_options.
lengthNoMax rows to return (page size). 1..5000. Keep small for exploration; increase to page through data.
offsetNoRow offset for pagination. Use `next_offset` from a prior call.
frequencyNoData frequency id, e.g. 'monthly', 'annual', 'hourly'. Valid values are in the dataset 'frequencies' metadata.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Beyond the readOnlyHint annotation, the description details the exact response structure (route, frequency, total, offset, has_more, next_offset, data, warnings) and explains pagination behavior via next_offset. It also discloses a behavioral quirk: incorrect data columns may yield empty rows. No contradictions with annotations.

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 well-structured: a one-sentence summary, a compact response payload block, and a brief workflow. Every sentence adds value, including the caveat about data columns. It is appropriately sized for a 9-parameter tool with pagination and facets, and it front-loads the core purpose.

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?

Given the tool's complexity (9 parameters, facets, frequencies, pagination), the description covers the essential context: how to obtain valid parameters via sibling tools, the response format, pagination using next_offset, and a key failure mode. The presence of an output schema description further supports completeness. No significant gaps remain.

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 the schema describes all parameters well. The description adds workflow-level semantics: connecting route to data_columns, frequencies, and facet ids, and explaining that invalid data columns can cause empty results. This extra context goes beyond the schema's per-parameter descriptions, though the schema still carries the bulk of the meaning.

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 'Query rows from an EIA dataset with filtering, sorting, and paging,' which clearly states the verb (query), resource (EIA dataset), and operations (filtering, sorting, paging). It distinguishes this tool from siblings like eia_browse_routes (route discovery) and eia_get_facet_options (facet values) by focusing on data retrieval.

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 workflow section explicitly instructs using eia_browse_routes to find the route and metadata, then eia_get_facet_options for facet values, then 'call this tool.' It also warns about potential empty rows if data columns are incorrect. This provides clear context and alternatives, though it doesn't explicitly state 'do not use this tool for discovery' or list exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GSA-TTS/mcp-server-eia'

If you have feedback or need assistance with the MCP directory API, please join our Discord server