Skip to main content
Glama
gridcarbon

gridcarbon-mcp

Official

Rank electricity zones by carbon intensity

compare_zones
Read-onlyIdempotent

Ranks electricity zones by latest published carbon intensity to identify the cleanest grid for running workloads. Lower values are cleaner; non-comparable GB data is excluded by default.

Instructions

Rank several electricity zones (or all 45) by their most recently published carbon intensity, cleanest first by default.

Use it for "where should I run this training job", "is Sweden cleaner than Poland right now", "what are the five cleanest grids you cover".

Data contract (read this before you report any number to a user):

  • Unit is gCO2eq/kWh (grams of CO2-equivalent per kilowatt-hour of electricity consumed). LOWER IS CLEANER. There is no upper bound; roughly <100 is very clean, ~100-300 is moderate, >400 is fossil-heavy.

  • "ts" is the START of the reporting interval, in UTC (ISO-8601, "Z" suffix). A value with ts=2026-08-26T01:00:00Z and a 60-minute resolution covers 01:00-02:00 UTC.

  • "latest" means NEWEST PUBLISHED, NOT "now". European zones typically run 2-4 hours behind real time; US (EIA) zones run 11-28 hours behind. Every reading carries "age_minutes" and "age_human" -- state that age when you report the value. Saying "the current carbon intensity in Texas is X" about a 20-hour-old number is wrong.

  • GB values come from NESO and use OPERATIONAL (combustion-only) emission factors, not the IPCC AR5 lifecycle factors used for the other 44 zones. GB numbers are systematically lower and MUST NOT be compared or ranked against other zones.

  • Coverage starts 2026-08-21T00:00:00Z; there is no data before that date.

  • Attribution is a licence condition. If you surface these values to an end user, credit: ENTSO-E Transparency Platform / U.S. Energy Information Administration (EIA) / NESO Carbon Intensity API. EIA does not endorse this service or any use of it.

Great Britain — the one thing that makes this tool easy to get wrong: GB's numbers come from NESO and use OPERATIONAL (combustion-only) factors. The other 44 zones use IPCC AR5 LIFECYCLE factors, which also count plant construction and fuel supply chains. GB therefore looks cleaner than like-for-like. GB is EXCLUDED from the ranking by default and returned in "excluded_from_ranking" WITH its value and the reason, so you can still report it — just report it separately, never as "GB is the cleanest of these". Passing include_gb_in_ranking=true ranks it anyway and flags every affected row; only do that if the user has been told why the numbers differ.

Comparing different moments: Each zone's newest published interval has its own timestamp. European zones run 2-4h behind, US zones 11-28h behind, so a Europe-vs-US ranking compares observations taken up to a day apart. "observation_times.age_gap_minutes" reports that spread and a warning is added when it exceeds 6 hours. Say so when it applies.

Args:

  • zones (string[], optional): zone codes to rank. Omit to rank all covered zones.

  • order ("cleanest_first" | "dirtiest_first", default "cleanest_first").

  • limit (integer 1-45, default 45): cap on ranked rows.

  • include_gb_in_ranking (boolean, default false): see above.

  • response_format ("markdown" | "json", default "markdown").

Returns (structured): { "unit": "gCO2eq/kWh", "order": "cleanest_first", "comparison_basis": "IPCC AR5 lifecycle factors (GB excluded: operational factors)", "ranked_count": 3, "omitted_by_limit": 0, "ranked": [ { "rank": 1, "zone": "FR", "zone_name": "France", "gco2eq_kwh": 48.3, "ts": "2026-08-26T00:00:00Z", "age_minutes": 168, "age_human": "2h 48m ago", "freshness": "normal", "band": "very clean", "comparable": true, "method": "computed:v1" } ], "cleanest": { ... }, "dirtiest": { ... }, "spread_gco2eq_kwh": 356.1, "excluded_from_ranking": [ { "zone": "GB", "zone_name": "Great Britain", "gco2eq_kwh": 114, "ts": "2026-08-26T01:30:00Z", "age_human": "1h 18m ago", "reason": "GB uses operational (combustion-only) factors ... not comparable ..." } ], "observation_times": { "newest_ts": "...", "oldest_ts": "...", "age_gap_minutes": 90 }, "headline": "Of 3 zone(s) ranked, FR is cleanest at 48.3 gCO2eq/kWh ...", "warnings": [ ... ] }

Unknown zone codes are returned in "excluded_from_ranking" with reason "unknown zone code" instead of failing the whole call — surface them to the user, do not substitute a neighbour.

Examples:

  • "Germany, France or Spain — which is cleanest?" -> zones=["DE","FR","ES"]

  • "Five cleanest grids you cover" -> omit zones, limit=5

  • "Dirtiest US grid today" -> zones=["US-ERCOT","US-PJM","US-MISO","US-SPP","US-SOCO", "US-CAISO","US-ISONE","US-NYISO","US-BPA","US-TVA"], order="dirtiest_first", limit=1

  • Don't use for: one zone (get_carbon_intensity) or a time series (get_intensity_history).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum ranked rows to return. Mainly useful when ranking all zones, e.g. limit=5 with order='cleanest_first' for the five cleanest grids.
orderNoSort direction. 'cleanest_first' = ascending gCO2eq/kWh (lowest emissions first).cleanest_first
zonesNoZone codes to rank, e.g. ["DE","FR","ES"]. Omit to rank every covered zone (use 'limit' to keep that readable). Unknown codes are reported back rather than silently dropped.
response_formatNoOutput format for the text content. 'markdown' is compact and human-readable; 'json' returns the full structured payload as text. Structured data is always returned alongside either way.markdown
include_gb_in_rankingNoGreat Britain uses operational (combustion-only) emission factors while the other 44 zones use IPCC AR5 lifecycle factors, so GB's number is systematically lower and ranking it against the others is misleading. By default GB is kept OUT of the ranking and reported separately with its value and an explanation. Set true only if the user has been told about the mismatch; GB is then ranked but flagged as not comparable in every row and in a top-level warning.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYes
orderYes
rankedYes
cleanestNo
dirtiestNo
headlineYes
warningsYes
ranked_countYes
comparison_basisYes
omitted_by_limitYesZones that had data and were ranked but were cut by 'limit'. When >0, every figure in this response describes the returned rows only.
observation_timesYes
spread_gco2eq_kwhNo
excluded_from_rankingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish readOnly, idempotent, and non-destructive behavior, so the bar is lower, but the description adds rich behavioral context: 'latest' means newest published rather than 'now', GB uses non-comparable operational factors and is excluded by default, unknown zones are returned instead of failing, and observation-time gaps are surfaced via warnings. No contradiction with the annotations 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 description is well-structured with a one-line purpose, use cases, data contract, dedicated GB warning, args, return shape, and examples. It is long, but the complexity of the GB comparability issue and data-currency semantics justifies the length. Minor redundancy exists because the GB caveat appears in both the data contract and the dedicated GB section.

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?

The description is exhaustive for the tool's complexity: it explains units, timestamps, freshness, GB exclusion logic, unknown-zone handling, observation-time gaps, attribution requirements, coverage start, and return structure. The detailed output schema relieves the need to describe return values, and the examples cover representative ranking queries.

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 description coverage is 100%, so the schema already documents every parameter in detail, including the important include_gb_in_ranking caveat. The description's Args section largely restates defaults, though the examples add practical usage context. This meets the high-coverage baseline without adding substantial new parameter-level meaning.

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 states an exact verb and resource: 'Rank several electricity zones (or all 45) by their most recently published carbon intensity, cleanest first by default.' It also names sibling alternatives in the examples ('Don't use for: one zone (get_carbon_intensity) or a time series (get_intensity_history)'), so an agent can distinguish this tool from its siblings.

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 use cases ('where should I run this training job', 'is Sweden cleaner than Poland right now') and lists when NOT to use it, naming the sibling tools directly. It also covers a critical selection rule: use this tool for ranking multiple zones, not for single-zone queries or historical series.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.