OpenWeather · Capability
OpenWeather One Call and Air Pollution API
Programmatic access to the OpenWeather One Call API for current, minute, hourly, and daily forecasts plus government weather alerts, and the OpenWeather Air Pollution API for current, forecast, and historical air quality data including the Air Quality Index and pollutant concentrations.
What You Can Do
GET
Getonecall
— Current and forecast weather data for a coordinate
/onecall
GET
Getonecalltimemachine
— Historical weather data for a coordinate and timestamp
/onecall/timemachine
GET
Getcurrentairpollution
— Current air pollution data for a coordinate
/air_pollution
GET
Getairpollutionforecast
— Hourly air pollution forecast for a coordinate
/air_pollution/forecast
GET
Getairpollutionhistory
— Historical air pollution data for a coordinate
/air_pollution/history
MCP Tools
getonecall
Current and forecast weather data for a coordinate
read-only
idempotent
getonecalltimemachine
Historical weather data for a coordinate and timestamp
read-only
idempotent
getcurrentairpollution
Current air pollution data for a coordinate
read-only
idempotent
getairpollutionforecast
Hourly air pollution forecast for a coordinate
read-only
idempotent
getairpollutionhistory
Historical air pollution data for a coordinate
read-only
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: OpenWeather One Call and Air Pollution API
description: Programmatic access to the OpenWeather One Call API for current, minute, hourly, and daily forecasts plus government
weather alerts, and the OpenWeather Air Pollution API for current, forecast, and historical air quality data including
the Air Quality Index and pollutant concentrations.
tags:
- Openweather
- API
created: '2026-05-06'
modified: '2026-05-06'
capability:
consumes:
- type: http
namespace: openweather
baseUri: https://api.openweathermap.org/data/3.0
description: OpenWeather One Call and Air Pollution API HTTP API.
authentication:
type: apikey
in: query
name: appid
value: '{{OPENWEATHER_TOKEN}}'
resources:
- name: onecall
path: /onecall
operations:
- name: getonecall
method: GET
description: Current and forecast weather data for a coordinate
inputParameters:
- name: lat
in: query
type: number
required: true
description: Latitude in decimal degrees, range -90 to 90.
- name: lon
in: query
type: number
required: true
description: Longitude in decimal degrees, range -180 to 180.
- name: exclude
in: query
type: string
description: Comma-separated list of forecast blocks to omit from the response. Allowed values are current, minutely,
hourly, daily, and alerts.
- name: units
in: query
type: string
description: Units of measurement. One of standard, metric, or imperial. Default is standard (Kelvin, m/s).
- name: lang
in: query
type: string
description: ISO language code for localized response text.
- name: appid
in: query
type: string
required: true
description: OpenWeather API key.
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: onecall-timemachine
path: /onecall/timemachine
operations:
- name: getonecalltimemachine
method: GET
description: Historical weather data for a coordinate and timestamp
inputParameters:
- name: lat
in: query
type: number
required: true
description: Latitude in decimal degrees.
- name: lon
in: query
type: number
required: true
description: Longitude in decimal degrees.
- name: dt
in: query
type: integer
required: true
description: Unix UTC timestamp for the requested historical reading.
- name: units
in: query
type: string
- name: lang
in: query
type: string
- name: appid
in: query
type: string
required: true
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: air-pollution
path: /air_pollution
operations:
- name: getcurrentairpollution
method: GET
description: Current air pollution data for a coordinate
inputParameters:
- name: lat
in: query
type: number
required: true
- name: lon
in: query
type: number
required: true
- name: appid
in: query
type: string
required: true
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: air-pollution-forecast
path: /air_pollution/forecast
operations:
- name: getairpollutionforecast
method: GET
description: Hourly air pollution forecast for a coordinate
inputParameters:
- name: lat
in: query
type: number
required: true
- name: lon
in: query
type: number
required: true
- name: appid
in: query
type: string
required: true
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
- name: air-pollution-history
path: /air_pollution/history
operations:
- name: getairpollutionhistory
method: GET
description: Historical air pollution data for a coordinate
inputParameters:
- name: lat
in: query
type: number
required: true
- name: lon
in: query
type: number
required: true
- name: start
in: query
type: integer
required: true
description: Unix UTC start timestamp.
- name: end
in: query
type: integer
required: true
description: Unix UTC end timestamp.
- name: appid
in: query
type: string
required: true
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
exposes:
- type: rest
port: 8080
namespace: openweather-rest
description: REST adapter for OpenWeather One Call and Air Pollution API.
resources:
- path: /onecall
name: getonecall
operations:
- method: GET
name: getonecall
description: Current and forecast weather data for a coordinate
call: openweather.getonecall
outputParameters:
- type: object
mapping: $.
- path: /onecall/timemachine
name: getonecalltimemachine
operations:
- method: GET
name: getonecalltimemachine
description: Historical weather data for a coordinate and timestamp
call: openweather.getonecalltimemachine
outputParameters:
- type: object
mapping: $.
- path: /air_pollution
name: getcurrentairpollution
operations:
- method: GET
name: getcurrentairpollution
description: Current air pollution data for a coordinate
call: openweather.getcurrentairpollution
outputParameters:
- type: object
mapping: $.
- path: /air_pollution/forecast
name: getairpollutionforecast
operations:
- method: GET
name: getairpollutionforecast
description: Hourly air pollution forecast for a coordinate
call: openweather.getairpollutionforecast
outputParameters:
- type: object
mapping: $.
- path: /air_pollution/history
name: getairpollutionhistory
operations:
- method: GET
name: getairpollutionhistory
description: Historical air pollution data for a coordinate
call: openweather.getairpollutionhistory
outputParameters:
- type: object
mapping: $.
- type: mcp
port: 9090
namespace: openweather-mcp
transport: http
description: MCP adapter for OpenWeather One Call and Air Pollution API for AI agent use.
tools:
- name: getonecall
description: Current and forecast weather data for a coordinate
hints:
readOnly: true
destructive: false
idempotent: true
call: openweather.getonecall
with:
lat: tools.lat
lon: tools.lon
exclude: tools.exclude
units: tools.units
lang: tools.lang
appid: tools.appid
inputParameters:
- name: lat
type: number
description: Latitude in decimal degrees, range -90 to 90.
required: true
- name: lon
type: number
description: Longitude in decimal degrees, range -180 to 180.
required: true
- name: exclude
type: string
description: Comma-separated list of forecast blocks to omit from the response. Allowed values are current, minutely,
hourly, daily, and alerts.
- name: units
type: string
description: Units of measurement. One of standard, metric, or imperial. Default is standard (Kelvin, m/s).
- name: lang
type: string
description: ISO language code for localized response text.
- name: appid
type: string
description: OpenWeather API key.
required: true
outputParameters:
- type: object
mapping: $.
- name: getonecalltimemachine
description: Historical weather data for a coordinate and timestamp
hints:
readOnly: true
destructive: false
idempotent: true
call: openweather.getonecalltimemachine
with:
lat: tools.lat
lon: tools.lon
dt: tools.dt
units: tools.units
lang: tools.lang
appid: tools.appid
inputParameters:
- name: lat
type: number
description: Latitude in decimal degrees.
required: true
- name: lon
type: number
description: Longitude in decimal degrees.
required: true
- name: dt
type: integer
description: Unix UTC timestamp for the requested historical reading.
required: true
- name: units
type: string
description: units
- name: lang
type: string
description: lang
- name: appid
type: string
description: appid
required: true
outputParameters:
- type: object
mapping: $.
- name: getcurrentairpollution
description: Current air pollution data for a coordinate
hints:
readOnly: true
destructive: false
idempotent: true
call: openweather.getcurrentairpollution
with:
lat: tools.lat
lon: tools.lon
appid: tools.appid
inputParameters:
- name: lat
type: number
description: lat
required: true
- name: lon
type: number
description: lon
required: true
- name: appid
type: string
description: appid
required: true
outputParameters:
- type: object
mapping: $.
- name: getairpollutionforecast
description: Hourly air pollution forecast for a coordinate
hints:
readOnly: true
destructive: false
idempotent: true
call: openweather.getairpollutionforecast
with:
lat: tools.lat
lon: tools.lon
appid: tools.appid
inputParameters:
- name: lat
type: number
description: lat
required: true
- name: lon
type: number
description: lon
required: true
- name: appid
type: string
description: appid
required: true
outputParameters:
- type: object
mapping: $.
- name: getairpollutionhistory
description: Historical air pollution data for a coordinate
hints:
readOnly: true
destructive: false
idempotent: true
call: openweather.getairpollutionhistory
with:
lat: tools.lat
lon: tools.lon
start: tools.start
end: tools.end
appid: tools.appid
inputParameters:
- name: lat
type: number
description: lat
required: true
- name: lon
type: number
description: lon
required: true
- name: start
type: integer
description: Unix UTC start timestamp.
required: true
- name: end
type: integer
description: Unix UTC end timestamp.
required: true
- name: appid
type: string
description: appid
required: true
outputParameters:
- type: object
mapping: $.
binds:
- namespace: env
keys:
OPENWEATHER_TOKEN: OPENWEATHER_TOKEN