get_forecast

Pack: airquality · Endpoint: https://gateway.pipeworx.io/airquality/mcp

Get hourly air quality forecast for a location. Returns US AQI, PM2.5, and PM10 predictions. Use to plan activities or alert users to upcoming poor air conditions.

Parameters

NameTypeRequiredDescription
latitudenumberyesLatitude of the location.
longitudenumberyesLongitude of the location.
daysnumbernoNumber of forecast days (1-7, default 3).

Example call

Arguments

{
  "latitude": 40.7128,
  "longitude": -74.006,
  "days": 3
}

curl

curl -X POST https://gateway.pipeworx.io/airquality/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_forecast","arguments":{"latitude":40.7128,"longitude":-74.006,"days":3}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_forecast', {
  "latitude": 40.7128,
  "longitude": -74.006,
  "days": 3
});

More examples

{
  "latitude": 37.7749,
  "longitude": -122.4194,
  "days": 5
}

Response shape

Always returns: latitude, longitude, hours

FieldTypeDescription
latitudenumberLatitude of the location
longitudenumberLongitude of the location
hoursarrayHourly air quality forecast
Full JSON Schema
{
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "description": "Latitude of the location"
    },
    "longitude": {
      "type": "number",
      "description": "Longitude of the location"
    },
    "hours": {
      "type": "array",
      "description": "Hourly air quality forecast",
      "items": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "ISO 8601 timestamp for the forecast hour"
          },
          "us_aqi": {
            "type": "number",
            "description": "US Air Quality Index score"
          },
          "aqi_category": {
            "type": "string",
            "description": "AQI category (Good, Moderate, Unhealthy, etc.)"
          },
          "pm2_5_ug_m3": {
            "type": "number",
            "description": "PM2.5 concentration in micrograms per cubic meter"
          },
          "pm10_ug_m3": {
            "type": "number",
            "description": "PM10 concentration in micrograms per cubic meter"
          }
        },
        "required": [
          "time",
          "us_aqi",
          "aqi_category",
          "pm2_5_ug_m3",
          "pm10_ug_m3"
        ]
      }
    }
  },
  "required": [
    "latitude",
    "longitude",
    "hours"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "airquality": {
      "url": "https://gateway.pipeworx.io/airquality/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026