Docs API reference

Power Generation API v1

Generated from core.contract.describe_power_generation_v1() and checked fixture-backed examples. Do not hand-edit the example JSON files.

Capability

What It Can Answer

Represented Facts

Data Point Contract

Does not answer:

REST Surface

MCP Surface

Local MCP Setup

Some MCP clients launch servers from the user's home directory or ignore a configured cwd. Use uv run --directory so the server always starts from the repository project.

{
  "command": "uv",
  "args": [
    "run",
    "--directory",
    "/absolute/path/to/OSINT",
    "python",
    "-m",
    "core.mcp_server"
  ]
}

Leave EXASCALE_PARQUET_BASE / EXASCALE_RAW_BASE unset: the one server hosts every data point's tools, and with no override it resolves each block's promoted snapshots and raw archive from the repository layout. Setting either env var points ALL tools at one directory — a per-block path breaks every other block's tools. They exist only for single-source sandboxes and tests.

Request Schema

Filters:

Atoms (select one via atom; the two atoms are non-additive):

{
  "default": "by_fuel",
  "description": "The two non-additive generation grains. Select one with `atom` (default `by_fuel`, the complete plant total); never sum across them. `by_generator` is the generator-level drill-down where reported, joinable to EIA-860M generators.",
  "values": [
    "by_fuel",
    "by_generator"
  ]
}

Group by:

Date range parameters:

Controls:

Ranking (how order_by / top_n / order join — order_by ranks groups by a metric, never a group_by dimension; top_n needs both a group_by and an order_by):

{
  "no_ranking": "Omit order_by and top_n to return all groups in group-key order.",
  "order": {
    "default": "desc",
    "valid_values": [
      "desc",
      "asc"
    ]
  },
  "order_by": {
    "accepts": "one of output.metrics",
    "note": "Ranks the groups by a metric (a measure). Not a group_by dimension \u2014 rows already come back grouped by each group_by field.",
    "requires": [
      "group_by"
    ],
    "valid_values": [
      "net_generation_mwh",
      "distinct_plant_count",
      "source_record_count"
    ]
  },
  "top_n": {
    "note": "Keeps the top N groups by order_by; the rest fold into one (other) remainder (additive metrics sum into it, non-additive ones are nulled) so the result still reconciles to summary.totals.",
    "requires": [
      "group_by",
      "order_by"
    ],
    "type": "positive integer"
  }
}

Output Schema

Aggregate metrics:

Metric groups:

{
  "entities": [
    "distinct_plant_count"
  ],
  "generation_mwh": [
    "net_generation_mwh"
  ],
  "records": [
    "source_record_count"
  ]
}

Response summary fields:

Accepted fact policy:

Metric metadata:

Metric Category Unit Aggregation Additive Across Groups Authoritative Total Definition
net_generation_mwh generation_mwh MWh sum true summary.totals.net_generation_mwh Sum of EIA-923 net electricity generation (MWh) within the current result scope.
distinct_plant_count entities count count_distinct false summary.totals.distinct_plant_count Count of distinct EIA plant IDs within the current result scope.
source_record_count records count count source records true summary.totals.source_record_count Count of normalized source rows (atom-months) contributing to the current result scope.

Rollup rules:

Detail record fields returned when include_records is true:

Row-level citation fields:

Aggregate citation fields:

Codebooks

Field Coverage Codes Examples Note
energy_source_code complete_for_validated_eia923_reported_fuel_codes 42 AB = Agricultural By-Products, ANT = Anthracite Coal, BFG = Blast Furnace Gas, BIT = Bituminous Coal, BLQ = Black Liquor
prime_mover_code complete_for_validated_eia923_prime_mover_codes 23 BA = Energy Storage, Battery, BT = Turbines Used in a Binary Cycle (including those used for geothermal applications), CA = Combined Cycle Steam Part, CC = Combined Cycle Total Unit (use only for plants/generators that are in planning stage, for which specific generator details cannot be provided), CE = Energy Storage, Compressed Air
balancing_authority_code partial_for_eia923 81 AEC = PowerSouth Energy Cooperative, AECI = Associated Electric Cooperative, Inc., AESO = Alberta Electric System Operator, AVA = Avista Corporation, AVRN = Avangrid Renewables, LLC EIA-923 reports this BA code on the plant row. exascale.build preserves it as source-reported data; it is not an independently validated physical BA-footprint assignment or corrected grid-operator attribution. A balancing authority is not a state. ERCO (ERCOT) lies wholly within Texas and covers ~90% of its load, but state=TX is the larger jurisdiction — it also includes non-ERCOT El Paso (WECC), the Panhandle (SPP), and East Texas (MISO), a material (~20%+) difference. Use balancing_authority_code for a grid and state for a jurisdiction; they are not interchangeable. When a phrase like 'the Texas grid' is ambiguous between the two, report both readings rather than guessing one (PD-009).

The complete machine-readable codebooks are included in capability-schema.json.

Checked Examples

Agent question Request params Checked output
How much did plant 3 (Barry) generate by fuel in January 2026? {"atom": "by_fuel", "data_month": "2026-01-01", "eia_plant_id": 3, "group_by": ["energy_source_code"]} generation-by-fuel.json
How much did each generator at plant 3 produce in January 2026? {"atom": "by_generator", "data_month": "2026-01-01", "eia_plant_id": 3, "group_by": ["generator_id"]} generation-by-generator.json
What net generation by fuel is reported for Alabama in January 2026? {"atom": "by_fuel", "data_month": "2026-01-01", "group_by": ["state", "energy_source_code"], "state": "AL"} generation-by-state-and-fuel.json
What is plant 3's monthly net generation across the reported months? {"atom": "by_fuel", "eia_plant_id": 3, "group_by": ["data_month"]} monthly-generation-trend.json
Return one plant 3 generation row for January 2026 with a row-level citation. {"data_month": "2026-01-01", "eia_plant_id": 3, "include_records": true, "limit": 1} generation-detail-with-citation.json
Verify the raw workbook row behind a returned citation citations[ref].verify (aggregate) or records[0].citation (detail) source-row-evidence.json
Dogfood the tool sequence as an agent list -> describe -> query -> evidence agent-dogfood-transcript.json

The checked schema output is capability-schema.json.

Agent Workflow

  1. Call list_capabilities_v1 and select power.generation.
  2. Call describe_power_generation_v1 to inspect valid filters, groupings, metrics, and citation fields.
  3. Call query_power_generation_v1 with bounded JSON params.
  4. If the answer needs proof, pass a returned row-level citation object to get_source_evidence_v1.
  5. Answer with the resolved as_of and relevant citations. Present returned metrics as authoritative for their declared source, snapshot, grain, and aggregation.
Generated from the tested API contract. Compare with the live capability map ↗