Xweather · Capability

Xweather Weather API — Alerts

Xweather Weather API — Alerts. 1 operations. Lead operation: Get Weather Alerts. Self-contained Naftiko capability covering one Xweather business surface.

Run with Naftiko XweatherAlerts

What You Can Do

GET
Getalerts — Get Weather Alerts
/v1/alerts/{location}

MCP Tools

get-weather-alerts

Get Weather Alerts

read-only idempotent

Capability Spec

weather-alerts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Xweather Weather API — Alerts
  description: 'Xweather Weather API — Alerts. 1 operations. Lead operation: Get Weather Alerts. Self-contained Naftiko capability
    covering one Xweather business surface.'
  tags:
  - Xweather
  - Alerts
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    XWEATHER_API_KEY: XWEATHER_API_KEY
capability:
  consumes:
  - type: http
    namespace: weather-alerts
    baseUri: https://data.api.xweather.com
    description: Xweather Weather API — Alerts business capability. Self-contained, no shared references.
    resources:
    - name: alerts-location
      path: /alerts/{location}
      operations:
      - name: getalerts
        method: GET
        description: Get Weather Alerts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: location
          in: path
          type: string
          description: Location identifier (ZIP code, city name, lat/long, or place name).
          required: true
        - name: client_id
          in: query
          type: string
          description: Your Xweather API client ID.
          required: true
        - name: client_secret
          in: query
          type: string
          description: Your Xweather API client secret.
          required: true
        - name: filter
          in: query
          type: string
          description: Filter by alert type (e.g., tornado, flood).
        - name: limit
          in: query
          type: integer
          description: Maximum number of alerts to return.
    authentication:
      type: apikey
      key: client_id
      value: '{{env.XWEATHER_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: weather-alerts-rest
    port: 8080
    description: REST adapter for Xweather Weather API — Alerts. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/alerts/{location}
      name: alerts-location
      description: REST surface for alerts-location.
      operations:
      - method: GET
        name: getalerts
        description: Get Weather Alerts
        call: weather-alerts.getalerts
        with:
          location: rest.location
          client_id: rest.client_id
          client_secret: rest.client_secret
          filter: rest.filter
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: weather-alerts-mcp
    port: 9090
    transport: http
    description: MCP adapter for Xweather Weather API — Alerts. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-weather-alerts
      description: Get Weather Alerts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: weather-alerts.getalerts
      with:
        location: tools.location
        client_id: tools.client_id
        client_secret: tools.client_secret
        filter: tools.filter
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.