Skip to content

Estimate AI carbon footprint

Footprint figures are illustrative estimates, not measurements of electricity consumption or actual emissions from AI infrastructure, and are not verified carbon-accounting data. Bloomy Earth always talks about climate contribution and responsibility — never about offsetting or neutralizing AI emissions.

Returns an illustrative energy-first estimate of AI usage — energy in watt-hours and CO2e in grams — computed inside the Worker from revision-pinned coefficients. The call performs no network request, needs no credentials and reads no stored state.

What it does

estimate_ai_footprint computes energy in Wh and CO2e in grams from one of two lanes:

  • Token lane. When the caller supplies one or more tokenUsage entries, energy is the energy-first per-token model: fresh input tokens priced at the bucket's C_in, cached input tokens priced at C_in times the cache-prefill multiplier, and output tokens priced at the bucket's C_out. The summed per-request IT energy is multiplied once by the datacenter uplift, then converted to grams with the single grid factor. A model id is routed to one of four size buckets by total parameter count, or to the conservative GENERIC bucket when no size parses.
  • Flat-rate lane. When no token entries are supplied, energy is the flat-rate per-response constants: one constant per standard text response, one per complex task and one per generated image.

Every result reports its mode (token or flat-rate), a per-row mode on every contribution, the bucket and routing basis each token entry was assigned, a client_asserted data-provenance label and an unquantified-uncertainty marker with a fixed reason. Nothing is cached between calls: identical calls return identical results.

When an agent reaches for it

  • A user asks for the footprint of the current session or conversation.
  • A user asks how much energy or CO2e a particular task, prompt batch or model call used.
  • A host exposes token counters and the user wants a token-aware estimate instead of a response count.
  • Someone wants a per-model breakdown of AI usage before deciding whether to make a climate contribution.
  • A user asks "how much CO2 was that?" about work the assistant just did.

Inputs

Name Type Required Meaning
standardResponses integer, 0 to 1e9 No — default 0 Count of standard text exchanges this session (flat-rate lane input).
complexResponses integer, 0 to 1e9 No — default 0 Count of complex responses such as reasoning, coding or analysis (flat-rate lane input).
imagesGenerated integer, 0 to 1e9 No — default 0 Count of generated images. Additive in both estimation modes.
tokenUsage array of 0 to 64 entries No Per-model token counters reported by the host. When present and non-empty, the estimate uses token-level energy and the response counters are not counted — one text lane per estimate. Omitted or empty selects the flat-rate lane and is a valid request, not an error.
tokenUsage[].modelId string, 1 to 200 characters Yes, inside an entry Model identifier used for size-bucket routing, for example meta-llama/Meta-Llama-3.1-8B. An unrecognized id routes to the conservative GENERIC bucket and never errors.
tokenUsage[].tokensIn integer, 0 to 1e9 Yes, inside an entry Total input tokens including cached tokens. Must be greater than or equal to cachedTokensIn.
tokenUsage[].tokensOut integer, 0 to 1e9 Yes, inside an entry Output tokens generated.
tokenUsage[].cachedTokensIn integer, 0 to 1e9 No — default 0 Cached input tokens, a subset of tokensIn. Rejected when it exceeds tokensIn.

The token counters are asserted by the client that calls the tool; the estimator cannot verify or measure them independently.

Output

The result is text plus a structured payload. The field list, without a schema dump:

  • energyWh and co2eGrams — the totals for the whole call.
  • mode — token or flat-rate.
  • contributions — one row per input group. A token row carries modelId, tokensIn, tokensOut, cachedTokensIn, freshTokensIn, bucket, routingBasis, energyWh and co2eGrams; a flat-rate row carries count, energyWh and co2eGrams. Every row carries its own mode, so an image row inside a token-mode result is labelled flat-rate.
  • imagesGenerated — echo of the image count.
  • dataProvenance — always client_asserted.
  • uncertainty — kind: "unquantified" with the fixed reason string, because no source publishes an interval at this scope.
  • methodologyVersion — the registry revision the coefficients come from.
  • methodologyLink — the public methodology page.
  • actionLink — the climate-contribution page. It carries no quantity and no CO2e framing.
  • disclaimer — the paired illustrative-estimate sentence.
  • disclosure — present only when token entries were supplied while the two response counters summed above zero; it names the counters that were not counted.

The text summary repeats the mode and provenance on its first line, labels every contribution row, and ends with the method version and a separate invitation to make a climate contribution — never as the remedy for the figure above it.

Scope and confirmation

estimate_ai_footprint is read-only and needs mcp:read only. It spends nothing, writes nothing and performs no network call, so it has no confirmation step and never consumes the server's two-call write-confirmation floor. That floor belongs to the three write tools; a read tool cannot trip it.

The tool's annotations state the same contract to a host reading tools/list: read-only, non-destructive, idempotent, closed-world.

Worked example

Both vectors below are registry-owned and recomputed from constants.json by the repository's docs-figures test. Both are illustrative estimates, not measurements. The coefficients are from registry revision 3, effective 2026-11-12.

Flat-rate vector — 100 standard responses, 10 complex tasks and 2 images:

100 × 0.047 Wh  +  10 × 0.47 Wh  +  2 × 2.907 Wh
  = 4.7 Wh      +  4.7 Wh        +  5.814 Wh
  = 15.214 Wh
15.214 × 458.29 / 1000 = 6.972424 g CO2e

Token vector — one SMALL entry with modelId meta-llama/Meta-Llama-3.1-8B, tokensIn 500, tokensOut 250 and cachedTokensIn 100:

fresh input  (500 - 100) × 0.00001858103875067594 = 0.007432415500270376 Wh
cached input        100  × 0.00001858103875067594 × 0.07
                                                    = 0.00013006727125473158 Wh
decode              250  × 0.00007432415500270376  = 0.01858103875067594 Wh
sum  = 0.026143521522201046 Wh × 1.3 datacenter uplift
     = 0.03398657797886136 Wh, reported as 0.033987 Wh
0.033987 × 458.29 / 1000 = 0.015576 g CO2e
bucket SMALL, routing basis parameters

A cached input portion costs less because prefix caching reuses the prefill computation already done for it: the shipped model prices cached input at the cache-prefill multiplier (0.07) of the bucket's C_in, while every fresh input token and every output token is priced in full.