estimate_flight
Pack: carbon-interface · Endpoint: https://gateway.pipeworx.io/carbon-interface/mcp
Estimate CO2 emissions from a flight. Provide number of passengers and flight legs (departure/arrival airport IATA codes). Returns per-passenger and total carbon emissions. Example: estimate_flight(2, [{“departure_airport”: “SFO”, “destination_airport”: “JFK”}]).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
_apiKey | string | no | Carbon Interface API key |
passengers | number | no | Number of passengers (e.g., 2) |
legs | array | no | Array of flight legs with IATA airport codes |
items | object | no | Departure airport IATA code (e.g., “SFO”) |
properties | string | no | Departure airport IATA code (e.g., “SFO”) |
departure_airport | string | yes | Departure airport IATA code (e.g., “SFO”) |
destination_airport | string | yes | Arrival airport IATA code (e.g., “JFK”) |
cabin_class | string | no | Cabin class: “economy”, “premium”, or “business” (optional) |
Example call
Arguments
{
"_apiKey": "your-carbon-interface-api-key",
"passengers": 2,
"legs": [
{
"departure_airport": "SFO",
"destination_airport": "JFK"
}
]
}
curl
curl -X POST https://gateway.pipeworx.io/carbon-interface/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"estimate_flight","arguments":{"_apiKey":"your-carbon-interface-api-key","passengers":2,"legs":[{"departure_airport":"SFO","destination_airport":"JFK"}]}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('estimate_flight', {
"_apiKey": "your-carbon-interface-api-key",
"passengers": 2,
"legs": [
{
"departure_airport": "SFO",
"destination_airport": "JFK"
}
]
});
More examples
{
"_apiKey": "your-carbon-interface-api-key",
"passengers": 1,
"legs": [
{
"departure_airport": "LHR",
"destination_airport": "CDG",
"cabin_class": "business"
}
]
}
Response shape
Always returns: passengers, legs, estimated_at, carbon_g, carbon_kg, carbon_mt, carbon_lb
| Field | Type | Description |
|---|---|---|
passengers | number | Number of passengers |
legs | array | Flight legs with airport codes |
estimated_at | string | null | ISO timestamp of estimate |
carbon_g | number | null | Carbon emissions in grams |
carbon_kg | number | null | Carbon emissions in kilograms |
carbon_mt | number | null | Carbon emissions in metric tons |
carbon_lb | number | null | Carbon emissions in pounds |
Full JSON Schema
{
"type": "object",
"properties": {
"passengers": {
"type": "number",
"description": "Number of passengers"
},
"legs": {
"type": "array",
"description": "Flight legs with airport codes",
"items": {
"type": "object",
"properties": {
"departure_airport": {
"type": [
"string",
"null"
],
"description": "Departure airport IATA code"
},
"destination_airport": {
"type": [
"string",
"null"
],
"description": "Arrival airport IATA code"
},
"cabin_class": {
"type": [
"string",
"null"
],
"description": "Cabin class of the flight"
}
}
}
},
"estimated_at": {
"type": [
"string",
"null"
],
"description": "ISO timestamp of estimate"
},
"carbon_g": {
"type": [
"number",
"null"
],
"description": "Carbon emissions in grams"
},
"carbon_kg": {
"type": [
"number",
"null"
],
"description": "Carbon emissions in kilograms"
},
"carbon_mt": {
"type": [
"number",
"null"
],
"description": "Carbon emissions in metric tons"
},
"carbon_lb": {
"type": [
"number",
"null"
],
"description": "Carbon emissions in pounds"
}
},
"required": [
"passengers",
"legs",
"estimated_at",
"carbon_g",
"carbon_kg",
"carbon_mt",
"carbon_lb"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"carbon-interface": {
"url": "https://gateway.pipeworx.io/carbon-interface/mcp"
}
}
}
See Getting Started for client-specific install steps.