Skip to main content
Glama

eia-energy-mcp-server

Search EIA Routes

eia_search_routes
Read-only

Fuzzy text search across route names, descriptions, and category labels. Resolves natural-language queries like "electricity retail sales by state" or "natural gas imports" to matching route paths. Multi-term queries are also matched term by term, so combining a commodity, a metric, and a sector — "electricity price residential", "coal generation industrial sector" — reaches the route carrying that data even when no single entry reads like the whole phrase. A query spelling the end of a route path in words — "retail sales" for electricity/retail-sales — ranks that route first. STEO and SEDS series names are indexed so queries like "crude oil production forecast" or "motor gasoline total consumption" also resolve, and so are facet values, so a fuel type or sector term like "wind" or "anthracite coal" resolves to the route that exposes it, with filter_hint carrying the filter to pass on. Results include isLeaf so you know whether to browse further or query directly. Results with score > 0.72 are weak matches — try a more specific query or use eia_browse_routes to explore the taxonomy. The first call after server start waits 24-30s while the index warms, and at most 45s; every later call returns in milliseconds. Check indexComplete before reading anything into a short or empty result set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (default 10). One call returns at most 30; a larger limit is served at 30, and truncated says whether more matches exist.
queryYesFree-text search terms to match against route names and descriptions. Leading and trailing whitespace is ignored.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoMost results this call could return — limit, or 30 when limit was larger.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of results returned.
noticeNoPresent when no routes matched, or when more matches exist than were returned — says how to narrow or widen the search.
resultsNoRanked matches, best first.
indexGapsNoPresent only when indexComplete is false: route paths whose metadata could not be fetched (call eia_browse_routes on one to re-fetch it) and index passes that did not land ("steo_series", "seds_series", "facet_values"), which the next search retries.
truncatedNoTrue when more matches exist past the ones returned; false when these are all.
totalIndexedNoTotal entries in the search index (routes + STEO and SEDS series names + facet values).
indexCompleteNoTrue when this answer was ranked against the complete corpus. False means part of it is missing (see indexGaps) — results may be short, and a better match may exist that was never scored.
effectiveQueryNoQuery as searched — the submitted text with surrounding whitespace trimmed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum results to return (default 10, max 30)."New value: +"Maximum results to return (default 10). One call returns at most 30; a larger limit is served at 30, and truncated says whether more matches exist."
    • changedInput schema / properties / limit / maximum
      Previous value: -30New value: +100
    • changedInput schema / properties / query / description
      Previous value: -"Free-text search terms to match against route names and descriptions."New value: +"Free-text search terms to match against route names and descriptions. Leading and trailing whitespace is ignored."
    • changedOutput schema / properties / cap / description
      Previous value: -"The limit that was applied."New value: +"Most results this call could return — limit, or 30 when limit was larger."
    • changedOutput schema / properties / effectiveQuery / description
      Previous value: -"Query as submitted to the Fuse.js index."New value: +"Query as searched — the submitted text with surrounding whitespace trimmed."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode."New value: +"Machine-readable failure mode. Declared by this tool: `rate_limited`: EIA rate limit hit (OVER_RATE_LIMIT) while building the route tree on the first call after server start. `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. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / error / properties / data / properties / reason / examples
      Added value: +[
      +  "rate_limited",
      +  "upstream_unreachable"
      +]
    • changedOutput schema / properties / indexGaps / description
      Previous value: -"Present only when indexComplete is false: route paths whose metadata could not be fetched (call eia_browse_routes on one to re-fetch it) and index passes that did not land (\"steo_series\", \"facet_values\")."New value: +"Present only when indexComplete is false: route paths whose metadata could not be fetched (call eia_browse_routes on one to re-fetch it) and index passes that did not land (\"steo_series\", \"seds_series\", \"facet_values\"), which the next search retries."
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery hint when no routes matched — suggests alternative queries or using eia_browse_routes."New value: +"Present when no routes matched, or when more matches exist than were returned — says how to narrow or widen the search."
    • changedOutput schema / properties / results / items / properties / filter_hint / description
      Previous value: -"Pre-built filter for eia_query_route when a specific facet value is required. Present on STEO series and facet-value results — pass directly as filters (e.g. eia_query_route(route=\"steo\", filters=filter_hint))."New value: +"Pre-built filter for eia_query_route when a specific facet value is required. Present on STEO and SEDS series results and facet-value results — pass directly as filters (e.g. eia_query_route(route=\"seds\", filters=filter_hint))."
    • changedOutput schema / properties / totalIndexed / description
      Previous value: -"Total entries in the search index (routes + STEO series names + facet values)."New value: +"Total entries in the search index (routes + STEO and SEDS series names + facet values)."
    • changedOutput schema / properties / truncated / description
      Previous value: -"True when matches were capped at limit; more may exist."New value: +"True when more matches exist past the ones returned; false when these are all."
  2. 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": [
      +      "results",
      +      "effectiveQuery",
      +      "totalIndexed",
      +      "indexComplete",
      +      "truncated",
      +      "shown",
      +      "cap"
      +    ]
      +  },
      +  {
      +    "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.",
      +          "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: -[
      -  "results",
      -  "effectiveQuery",
      -  "totalIndexed",
      -  "indexComplete",
      -  "truncated",
      -  "shown",
      -  "cap"
      -]
  3. Changed1 schema field changed
    • changedOutput schema / properties / results / items / properties / score / description
      Previous value: -"Fuzzy match score: 0 = exact, 1 = no match. Lower is better; above 0.9 the match is unreliable."New value: +"Match score: 0 = exact, 1 = no match. Lower is better; above 0.72 the match is unreliable. On a multi-term query it is the better of the whole-phrase score and a per-term score that penalizes each query term the entry does not carry."
  4. Changed3 schema fields changed
    • addedOutput schema / properties / indexComplete
      Added value: +{
      +  "description": "True when this answer was ranked against the complete corpus. False means part of it is missing (see indexGaps) — results may be short, and a better match may exist that was never scored.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / indexGaps
      Added value: +{
      +  "description": "Present only when indexComplete is false: route paths whose metadata could not be fetched (call eia_browse_routes on one to re-fetch it) and index passes that did not land (\"steo_series\", \"facet_values\").",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "effectiveQuery",
      -  "totalIndexed",
      -  "truncated",
      -  "shown",
      -  "cap"
      -]New value: +[
      +  "results",
      +  "effectiveQuery",
      +  "totalIndexed",
      +  "indexComplete",
      +  "truncated",
      +  "shown",
      +  "cap"
      +]
  5. Changed2 schema fields changed
    • changedOutput schema / properties / results / items / properties / filter_hint / description
      Previous value: -"Pre-built filter for eia_query_route when a specific facet value is required. Present on STEO series results — pass directly as filters (e.g. eia_query_route(route=\"steo\", filters=filter_hint))."New value: +"Pre-built filter for eia_query_route when a specific facet value is required. Present on STEO series and facet-value results — pass directly as filters (e.g. eia_query_route(route=\"steo\", filters=filter_hint))."
    • changedOutput schema / properties / totalIndexed / description
      Previous value: -"Total entries in the search index (routes + STEO series names)."New value: +"Total entries in the search index (routes + STEO series names + facet values)."
  6. Changed1 schema field changed
    • changedOutput schema / properties / results / items / properties / score / description
      Previous value: -"Fuzzy match score: 0 = exact, 1 = no match. Lower is better."New value: +"Fuzzy match score: 0 = exact, 1 = no match. Lower is better; above 0.9 the match is unreliable."
  7. Changed4 schema fields changed
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The limit that was applied.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of results returned.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when matches were capped at limit; more may exist.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "effectiveQuery",
      -  "totalIndexed"
      -]New value: +[
      +  "results",
      +  "effectiveQuery",
      +  "totalIndexed",
      +  "truncated",
      +  "shown",
      +  "cap"
      +]
  8. Changed5 schema fields changed
    • addedOutput schema / properties / effectiveQuery
      Added value: +{
      +  "description": "Query as submitted to the Fuse.js index.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Recovery hint when no routes matched — suggests alternative queries or using eia_browse_routes.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / totalIndexed
      Added value: +{
      +  "description": "Total entries in the search index (routes + STEO series names).",
      +  "type": "number"
      +}
    • removedOutput schema / properties / total_indexed
      Removed value: -{
      -  "description": "Total entries in the search index (routes + STEO series names).",
      -  "type": "number"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "total_indexed"
      -]New value: +[
      +  "results",
      +  "effectiveQuery",
      +  "totalIndexed"
      +]
  9. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.