Skip to main content
Glama

eia-energy-mcp-server

Describe EIA Route

eia_describe_route
Read-only

Returns metadata for a leaf route: available facets with their valid values, data column names and units, frequency options, and date range. Call this before eia_query_route to discover valid facet IDs, facet values, column IDs, and frequency codes. Each facet returns a capped window of its values with value_count and values_truncated alongside; pass facet and values_offset to page through the rest of one facet. A values_offset past the last value of a facet returns an empty window for it and a notice naming the count to page against. Facet values are fetched from separate EIA endpoints and merged — results are cached per-route for the process lifetime to minimize API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
facetNoRestrict the response to one facet by ID (e.g. "stateid"). Use with values_offset to page a facet whose values were truncated. Omit to get every facet.
routeYesLeaf route path (e.g. "electricity/retail-sales", "steo"). Discoverable via eia_browse_routes or eia_search_routes. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like "/electricity/retail-sales/" resolves to the same route.
values_offsetNoIndex of the first facet value to return, applied to every facet in the response. Use the value named in a truncation hint to continue past the cap.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
routeNoThe route path described.
facetsNoFilterable dimensions. Each facet has an ID and a window of its valid values. Restricted to one entry when the facet input is set.
noticeNoGuidance when values_offset lands past the last value of one or more facets — names each emptied facet, its value_count, and its last valid offset. Absent when every facet returned values.
date_rangeNoAvailable date range for this route.
descriptionNoHuman-readable description of the dataset.
frequenciesNoValid frequency options for eia_query_route.
data_columnsNoData columns available for this route.
values_offsetNoIndex of the first facet value returned, echoing the requested offset.
default_frequencyNoDefault frequency ID used when none is specified.
default_date_formatNoPeriod format for the default frequency (e.g. "YYYY-MM").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "route",
      +      "description",
      +      "facets",
      +      "values_offset",
      +      "data_columns",
      +      "frequencies",
      +      "date_range",
      +      "default_frequency",
      +      "default_date_format"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `route_not_found`: Route does not exist in the EIA taxonomy. `route_not_queryable`: Route is a category node with sub-routes, not a queryable leaf. `facet_not_found`: The facet input names an ID the route does not expose. `rate_limited`: EIA rate limit hit during facet fan-out. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "route_not_found",
      +            "route_not_queryable",
      +            "facet_not_found",
      +            "rate_limited"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "route",
      -  "description",
      -  "facets",
      -  "values_offset",
      -  "data_columns",
      -  "frequencies",
      -  "date_range",
      -  "default_frequency",
      -  "default_date_format"
      -]
  2. Changed1 schema field changed
    • changedInput schema / properties / route / description
      Previous value: -"Leaf route path (e.g. \"electricity/retail-sales\", \"steo\"). Discoverable via eia_browse_routes or eia_search_routes."New value: +"Leaf route path (e.g. \"electricity/retail-sales\", \"steo\"). Discoverable via eia_browse_routes or eia_search_routes. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route."
  3. Changed1 schema field changed
    • changedOutput schema / properties / facets / items / properties / values / items / properties / name / description
      Previous value: -"Human-readable name."New value: +"Human-readable name. Falls back to the alias, then to the id, on the values EIA sends without one."
  4. Changed1 schema field changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when values_offset lands past the last value of one or more facets — names each emptied facet, its value_count, and its last valid offset. Absent when every facet returned values.",
      +  "type": "string"
      +}
  5. Changed9 schema fields changed
    • addedInput schema / properties / facet
      Added value: +{
      +  "description": "Restrict the response to one facet by ID (e.g. \"stateid\"). Use with values_offset to page a facet whose values were truncated. Omit to get every facet.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / values_offset
      Added value: +{
      +  "default": 0,
      +  "description": "Index of the first facet value to return, applied to every facet in the response. Use the value named in a truncation hint to continue past the cap.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / facets / description
      Previous value: -"Filterable dimensions. Each facet has an ID and a set of valid values."New value: +"Filterable dimensions. Each facet has an ID and a window of its valid values. Restricted to one entry when the facet input is set."
    • addedOutput schema / properties / facets / items / properties / value_count
      Added value: +{
      +  "description": "Total values this facet has upstream, independent of the returned window.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / facets / items / properties / values / description
      Previous value: -"Valid values for this facet dimension."New value: +"Valid values for this facet dimension, starting at values_offset and capped at EIA_FACET_VALUE_CAP."
    • addedOutput schema / properties / facets / items / properties / values_truncated
      Added value: +{
      +  "description": "True when values stops short of value_count. Call eia_describe_route again with this facet ID and values_offset set to values_offset + values.length for the next page.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / facets / items / required
      Previous value: -[
      -  "id",
      -  "description",
      -  "values"
      -]New value: +[
      +  "id",
      +  "description",
      +  "values",
      +  "value_count",
      +  "values_truncated"
      +]
    • addedOutput schema / properties / values_offset
      Added value: +{
      +  "description": "Index of the first facet value returned, echoing the requested offset.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "route",
      -  "description",
      -  "facets",
      -  "data_columns",
      -  "frequencies",
      -  "date_range",
      -  "default_frequency",
      -  "default_date_format"
      -]New value: +[
      +  "route",
      +  "description",
      +  "facets",
      +  "values_offset",
      +  "data_columns",
      +  "frequencies",
      +  "date_range",
      +  "default_frequency",
      +  "default_date_format"
      +]
  6. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With readOnlyHint=true, the bar is lower, but the description still adds valuable behavioral context: it discloses that facet values are fetched from separate EIA endpoints and merged, that results are cached per-route for the process lifetime, and it explains the capped window with value_count and values_truncated plus the empty-window notice. No contradiction 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 dense but every sentence earns its place: purpose, usage ordering, pagination mechanics, and caching. It is front-loaded with the core purpose and avoids redundancy. Despite being longer than average, it is tightly written with no filler.

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 (multiple parameters, pagination, merging behavior) and the existence of an output schema that defines return values, the description covers all aspects an agent needs: what the tool does, when to call it, how to paginate, and caching implications. Nothing essential 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 coverage is 100% and each parameter already has a meaningful description. The tool description adds extra guidance beyond the schema, such as how to use facet and values_offset together to page through truncated results and what happens with offset past the end. This exceeds the baseline of 3 for full coverage.

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 clearly states the tool returns metadata for a leaf route and enumerates exactly what that metadata includes (facets, columns, units, frequency, date range). It distinguishes itself from siblings by explicitly naming eia_query_route as its predecessor and implying that route discovery is done via eia_browse_routes/eia_search_routes.

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?

The description gives explicit when-to-use guidance: 'Call this before eia_query_route to discover valid facet IDs...' It also explains pagination usage (pass facet and values_offset) and the behavior when paging past the last value. This effectively tells the agent how to sequence operations relative to siblings.

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.