Estimate Electricity
estimate_electricityEstimate CO2 emissions from electricity usage. Returns carbon emissions in grams, kg, and metric tons. Example: estimate_electricity(500, "us", "kwh") for 500 kWh in the US.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"unit": "kwh",
"value": 500,
"_apiKey": "your-carbon-interface-api-key",
"country": "us"
},
"name": "estimate_electricity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit of electricity: "kwh" or "mwh" (default: "kwh") | |
| state | No | US state code for more precise estimate (e.g., "ca", "ny"). Only for US. | |
| value | Yes | Amount of electricity consumed (e.g., 500) | |
| _apiKey | Yes | Carbon Interface API key | |
| country | Yes | ISO 3166-1 alpha-2 country code (e.g., "us", "gb", "de") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | US state code if provided | |
| country | Yes | ISO 3166-1 alpha-2 country code | |
| carbon_g | Yes | Carbon emissions in grams | |
| carbon_kg | Yes | Carbon emissions in kilograms | |
| carbon_lb | Yes | Carbon emissions in pounds | |
| carbon_mt | Yes | Carbon emissions in metric tons | |
| estimated_at | Yes | ISO timestamp of estimate | |
| electricity_unit | Yes | Unit of electricity (kwh or mwh) | |
| electricity_value | Yes | Amount of electricity consumed |