Skip to main content
Glama

eia-energy-mcp-server

Browse EIA Routes

eia_browse_routes
Read-only

Lists child routes under a given path in the EIA dataset taxonomy. Start with no path to get the 14 top-level categories (electricity, petroleum, natural-gas, steo, aeo, ieo, seds, etc.), then drill into subcategories. Each result includes an isLeaf flag — leaf routes are queryable endpoints; non-leaf routes have children to browse. When isLeaf is true on the browsed path itself, switch to eia_describe_route. The first call after server start waits up to 20s for the route tree to warm, then answers from EIA directly.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "eia_browse_routes"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoRoute path to browse (e.g. "electricity", "petroleum/pri"). Omit for root. Whitespace and slashes are normalized, then one complete leading v2 segment is removed: "/v2/electricity/retail-sales/" resolves to "electricity/retail-sales", and "/v2/" to root. A path naming an EIA endpoint is refused: pass the route before its data or facet segment ("petroleum/pri/spt", not "petroleum/pri/spt/data" or "petroleum/pri/spt/facet/series"), and give the ID of a seriesid/{id} path to eia_search_routes. Full URLs are not normalized.

Output Schema

NameRequiredDescriptionDefault
pathNoThe path that was browsed (empty string for root).
errorNoPresent when the call failed. Absent on success.
isLeafNoTrue when the browsed path itself is a leaf route — no children to drill into; use eia_describe_route instead.
childrenNoChild entries under the browsed path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / path / description
      Previous value: -"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Whitespace and slashes are normalized, then one complete leading v2 segment is removed: \"/v2/electricity/retail-sales/\" resolves to \"electricity/retail-sales\", and \"/v2/\" to root. Full URLs and /data suffixes are not normalized."New value: +"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Whitespace and slashes are normalized, then one complete leading v2 segment is removed: \"/v2/electricity/retail-sales/\" resolves to \"electricity/retail-sales\", and \"/v2/\" to root. A path naming an EIA endpoint is refused: pass the route before its data or facet segment (\"petroleum/pri/spt\", not \"petroleum/pri/spt/data\" or \"petroleum/pri/spt/facet/series\"), and give the ID of a seriesid/{id} path to eia_search_routes. Full URLs are not normalized."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `upstream_invalid_response`: EIA returned an unusable response body or a missing route or data envelope. `upstream_unavailable`: EIA answered with a retryable HTTP service failure. `upstream_timeout`: EIA did not answer in time: one attempt passed 45 s, or the call passed its 56 s deadline across retries. `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `upstream_invalid_response`: EIA returned an unusable response body or a missing route or data envelope. `upstream_unavailable`: EIA answered with a retryable HTTP service failure. `upstream_timeout`: EIA did not answer in time: one attempt passed 45 s, or the call passed its 56 s deadline across retries. `route_not_found`: Path does not exist in the EIA taxonomy, or names an EIA endpoint rather than a route: a data or facet segment, or a leading seriesid segment. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. Other values are possible when a failure originates below the handler."
  2. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `upstream_invalid_response`: EIA returned an unusable response body or a missing route or data envelope. `upstream_unavailable`: EIA answered with a retryable HTTP service failure. `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `upstream_invalid_response`: EIA returned an unusable response body or a missing route or data envelope. `upstream_unavailable`: EIA answered with a retryable HTTP service failure. `upstream_timeout`: EIA did not answer in time: one attempt passed 45 s, or the call passed its 56 s deadline across retries. `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, on the live fetch of the browsed path a cold call falls back to, or while re-fetching a path the warm could not fetch. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "upstream_invalid_response",
      -  "upstream_unavailable",
      -  "route_not_found",
      -  "rate_limited",
      -  "upstream_unreachable"
      -]New value: +[
      +  "upstream_invalid_response",
      +  "upstream_unavailable",
      +  "upstream_timeout",
      +  "route_not_found",
      +  "rate_limited",
      +  "upstream_unreachable"
      +]
  3. Changed3 schema fields changed
    • changedInput schema / properties / path / description
      Previous value: -"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route."New value: +"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Whitespace and slashes are normalized, then one complete leading v2 segment is removed: \"/v2/electricity/retail-sales/\" resolves to \"electricity/retail-sales\", and \"/v2/\" to root. Full URLs and /data suffixes are not normalized."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `upstream_invalid_response`: EIA returned an unusable response body or a missing route or data envelope. `upstream_unavailable`: EIA answered with a retryable HTTP service failure. `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "route_not_found",
      -  "rate_limited",
      -  "upstream_unreachable"
      -]New value: +[
      +  "upstream_invalid_response",
      +  "upstream_unavailable",
      +  "route_not_found",
      +  "rate_limited",
      +  "upstream_unreachable"
      +]
  4. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `route_not_found`: Path does not exist in the EIA taxonomy. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `route_not_found`: Path does not exist in the EIA taxonomy. `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. `upstream_unreachable`: EIA could not be reached (connection refused or reset, DNS failure) while building the route tree on the first call after server start, or on the live fetch of the browsed path a cold call falls back to. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "route_not_found"
      -]New value: +[
      +  "route_not_found",
      +  "rate_limited",
      +  "upstream_unreachable"
      +]
  5. 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": [
      +      "path",
      +      "children",
      +      "isLeaf"
      +    ]
      +  },
      +  {
      +    "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`: Path does not exist in the EIA taxonomy. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "route_not_found"
      +          ],
      +          "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: -[
      -  "path",
      -  "children",
      -  "isLeaf"
      -]
  6. Changed1 schema field changed
    • changedInput schema / properties / path / description
      Previous value: -"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root."New value: +"Route path to browse (e.g. \"electricity\", \"petroleum/pri\"). Omit for root. Leading, trailing, and doubled slashes are stripped, so an EIA-doc spelling like \"/electricity/retail-sales/\" resolves to the same route."
  7. 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 and openWorldHint=false, so safety is covered. The description adds genuine operational context beyond that: the cold-start latency of up to 20s on the first call and the leaf/non-leaf semantics that determine whether a route is a queryable endpoint. It stops short of covering failure modes or result ordering, which keeps it from a 5.

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?

Five short sentences, front-loaded with the core purpose, followed by drill-down guidance, the isLeaf rule, and the latency note. Every sentence is functional, though the parenthetical enumeration of top-level categories is mildly verbose for what it conveys.

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?

For a one-parameter read-only browser with an output schema and full annotation coverage, the description supplies the workflow, the leaf/non-leaf interpretation, the sibling handoff, and the cold-start latency. Nothing an agent needs in order to call it and interpret results is missing.

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

Parameters3/5

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

Schema coverage is 100% for the single path parameter, and the schema description is already rich, covering normalization, the leading v2 segment stripping, endpoint refusal, and full-URL behavior. The tool description adds no parameter meaning beyond what the schema states, so the baseline of 3 applies.

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 and resource: 'Lists child routes under a given path in the EIA dataset taxonomy.' It then distinguishes this browsing behavior from the querying leaf behavior by naming eia_describe_route as the successor when isLeaf is true, so an agent can separate it from siblings without opening a 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?

It gives an explicit call sequence: start with no path for the 14 top-level categories, drill into subcategories, then switch to eia_describe_route once the browsed path is a leaf. The parameter schema reinforces the routing rules by sending seriesid/{id} paths to eia_search_routes, covering the main alternatives and exclusions.

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.