Skip to main content
Glama

GridHub Electricity Market Data

Historical time series

get_history
Read-onlyIdempotent

Time series for one metric in one zone over a start/end window (Unix seconds). Rows are returned oldest-first and the 'limit' truncates from the OLDEST end, so a small limit over a wide window returns old data, not recent data — for 'the latest N points' set start close to now, or use get_latest / get_zone_brief for current values. Default window is the last 24h (last ~400 days for capacity, which is annual). Max window 31 days per call (400 for capacity); paginate with start/end for more. Metrics: price (wholesale, local currency per MWh), demand (MW), generation (per fuel, 'fuel' field set; % or MW depending on zone; GB and US-CAISO only), carbon-intensity (gCO2/kWh; GB only), interchange (net imports, MW), capacity (installed MW per fuel; European zones only). Authentication: send 'Authorization: Bearer ' on the MCP connection (free key, 500 requests/day, instant email signup at https://grid-hub.app/developers), or pay per call with x402 (USDC on Base) via the X-PAYMENT header. With no credentials, data tools run in free sample mode: real, current data but truncated (history capped at 50 rows; brief returns one context block). Sample results are clearly marked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoWindow end, Unix seconds. Default: now.
zoneYesZone id. US ISOs: US-CAISO, US-ERCOT, US-PJM, US-MISO, US-NYISO, US-ISONE, US-SPP. Europe: DE-LU, FR, ES, IT-NO, NL, BE, PL, SE-3, NO-2, DK-1, AT, CH. Great Britain: GB. Australia (NEM): AU-NSW, AU-QLD, AU-VIC, AU-SA, AU-TAS. Call list_zones for names, sources, currencies and licences.
limitNoMax rows (default 200, max 1000 via MCP; sample mode caps at 50).
startNoWindow start, Unix seconds. Default: end minus 24h.
metricYesWhich series to fetch.
api_keyNoOptional GridHub API key (ghk_...). Prefer sending it as an 'Authorization: Bearer <key>' HTTP header on the MCP connection; use this argument only if your client cannot set headers. Without a key the tool runs in free sample mode (truncated output).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
dataNo
zoneNo
countNo
startNo
metricNo
licenseNo
attributionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attribution": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "count": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "data": {
      +      "items": {
      +        "properties": {
      +          "fuel": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "metric": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "resolution": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "source": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "ts": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "unit": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "value": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": [
      +          "object",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "end": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "license": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "metric": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "start": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "zone": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint, idempotentHint, and non-destructive behavior, so the description correctly focuses on what they cannot convey: oldest-first row ordering, the counterintuitive 'limit truncates from the OLDEST end' behavior, default and maximum window sizes, pagination via start/end, and the credential modes (Bearer key at 500 req/day, x402 pay-per-call, or truncated free sample mode). This is rich behavioral disclosure beyond annotations. The only remaining gap is that it doesn't state the response row shape or timestamp resolution, though an output schema exists.

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?

The most consequential gotcha (limit truncates from the oldest end) is front-loaded, and the dense paragraphs are each load-bearing. It is long, but the length is driven by genuine complexity (six metrics, two window regimes, three auth modes) rather than padding. Minor tightening of the auth paragraph is possible but would risk losing information.

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 six parameters, two enums, an output schema, and open-world annotations, the description covers everything an agent needs to call this correctly: metric semantics, window defaults and limits, ordering/limit behavior, pagination, and the full authentication and sample-mode story. Because an output schema exists, it correctly does not spend space on return values.

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

Parameters5/5

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

Schema description coverage is already 100%, so the baseline is 3, but the description adds substantial meaning beyond the schema: metric units and semantics (wholesale price in local currency per MWh, demand in MW, generation per fuel with zone restrictions like GB/US-CAISO, carbon-intensity in gCO2/kWh GB-only, capacity European-only), the ~400-day annual default window for capacity, and the direction in which limit truncates.

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 opening sentence gives a precise verb+resource+scope: 'Time series for one metric in one zone over a start/end window (Unix seconds).' It enumerates exactly which metrics are available (price, demand, generation, carbon-intensity, interchange, capacity) with units, so the agent knows what this tool retrieves versus its siblings like get_latest and get_zone_brief, which the description explicitly positions as the alternative for current values.

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?

Explicit routing: for 'the latest N points' set start close to now, or use get_latest / get_zone_brief instead. It also gives window defaults, max window per call, pagination guidance, and sample-mode behavior, so an agent knows when this tool is and isn't the right choice without opening the schema.

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.