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

NameTypeRequiredDescription
_apiKeystringnoCarbon Interface API key
passengersnumbernoNumber of passengers (e.g., 2)
legsarraynoArray of flight legs with IATA airport codes
itemsobjectnoDeparture airport IATA code (e.g., “SFO”)
propertiesstringnoDeparture airport IATA code (e.g., “SFO”)
departure_airportstringyesDeparture airport IATA code (e.g., “SFO”)
destination_airportstringyesArrival airport IATA code (e.g., “JFK”)
cabin_classstringnoCabin 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

FieldTypeDescription
passengersnumberNumber of passengers
legsarrayFlight legs with airport codes
estimated_atstring | nullISO timestamp of estimate
carbon_gnumber | nullCarbon emissions in grams
carbon_kgnumber | nullCarbon emissions in kilograms
carbon_mtnumber | nullCarbon emissions in metric tons
carbon_lbnumber | nullCarbon 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.

Regenerated from source · build May 9, 2026