OpenWeather · Capability

OpenWeather One Call and Air Pollution API — One Call

OpenWeather One Call and Air Pollution API — One Call. 2 operations. Lead operation: Current and forecast weather data for a coordinate. Self-contained Naftiko capability covering one Openweather business surface.

Run with Naftiko OpenweatherOne Call

What You Can Do

GET
Getonecall — Current and forecast weather data for a coordinate
/v1/onecall
GET
Getonecalltimemachine — Historical weather data for a coordinate and timestamp
/v1/onecall/timemachine

MCP Tools

current-and-forecast-weather-data

Current and forecast weather data for a coordinate

read-only idempotent
historical-weather-data-coordinate-and

Historical weather data for a coordinate and timestamp

read-only idempotent

Capability Spec

openweather-one-call.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: OpenWeather One Call and Air Pollution API — One Call
  description: 'OpenWeather One Call and Air Pollution API — One Call. 2 operations. Lead operation: Current and forecast
    weather data for a coordinate. Self-contained Naftiko capability covering one Openweather business surface.'
  tags:
  - Openweather
  - One Call
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    OPENWEATHER_API_KEY: OPENWEATHER_API_KEY
capability:
  consumes:
  - type: http
    namespace: openweather-one-call
    baseUri: https://api.openweathermap.org/data/3.0
    description: OpenWeather One Call and Air Pollution API — One Call business capability. Self-contained, no shared references.
    resources:
    - name: onecall
      path: /onecall
      operations:
      - name: getonecall
        method: GET
        description: Current and forecast weather data for a coordinate
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: lat
          in: query
          type: number
          description: Latitude in decimal degrees, range -90 to 90.
          required: true
        - name: lon
          in: query
          type: number
          description: Longitude in decimal degrees, range -180 to 180.
          required: true
        - 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
          description: OpenWeather API key.
          required: true
    - name: onecall-timemachine
      path: /onecall/timemachine
      operations:
      - name: getonecalltimemachine
        method: GET
        description: Historical weather data for a coordinate and timestamp
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: lat
          in: query
          type: number
          description: Latitude in decimal degrees.
          required: true
        - name: lon
          in: query
          type: number
          description: Longitude in decimal degrees.
          required: true
        - name: dt
          in: query
          type: integer
          description: Unix UTC timestamp for the requested historical reading.
          required: true
        - name: units
          in: query
          type: string
        - name: lang
          in: query
          type: string
        - name: appid
          in: query
          type: string
          required: true
    authentication:
      type: apikey
      key: appid
      value: '{{env.OPENWEATHER_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: openweather-one-call-rest
    port: 8080
    description: REST adapter for OpenWeather One Call and Air Pollution API — One Call. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/onecall
      name: onecall
      description: REST surface for onecall.
      operations:
      - method: GET
        name: getonecall
        description: Current and forecast weather data for a coordinate
        call: openweather-one-call.getonecall
        with:
          lat: rest.lat
          lon: rest.lon
          exclude: rest.exclude
          units: rest.units
          lang: rest.lang
          appid: rest.appid
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/onecall/timemachine
      name: onecall-timemachine
      description: REST surface for onecall-timemachine.
      operations:
      - method: GET
        name: getonecalltimemachine
        description: Historical weather data for a coordinate and timestamp
        call: openweather-one-call.getonecalltimemachine
        with:
          lat: rest.lat
          lon: rest.lon
          dt: rest.dt
          units: rest.units
          lang: rest.lang
          appid: rest.appid
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: openweather-one-call-mcp
    port: 9090
    transport: http
    description: MCP adapter for OpenWeather One Call and Air Pollution API — One Call. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: current-and-forecast-weather-data
      description: Current and forecast weather data for a coordinate
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openweather-one-call.getonecall
      with:
        lat: tools.lat
        lon: tools.lon
        exclude: tools.exclude
        units: tools.units
        lang: tools.lang
        appid: tools.appid
      outputParameters:
      - type: object
        mapping: $.
    - name: historical-weather-data-coordinate-and
      description: Historical weather data for a coordinate and timestamp
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: openweather-one-call.getonecalltimemachine
      with:
        lat: tools.lat
        lon: tools.lon
        dt: tools.dt
        units: tools.units
        lang: tools.lang
        appid: tools.appid
      outputParameters:
      - type: object
        mapping: $.