Weather briefing

Full weather briefing for a location: current conditions, 7-day forecast, and air quality index in one pass.

$0.006 per call · one payment for the whole workflow
POST /api/skill/weather-brief
Sample output + API docs →

3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.

When to use this pack

An agent needs a comprehensive weather picture for a location - not just 'is it raining now?' but 'what's the full outlook?' Common triggers: a user asks about weather before a trip, a scheduling agent needs to warn about upcoming severe weather, or a logistics system needs outdoor conditions + AQI for worker safety. Running the three weather tools individually loses the composite picture; this pack sequences them and produces a unified briefing with current snapshot, daily forecast, and air quality side-by-side.

Tools in this pack

All 3 run inside the single $0.006 call above. Each is also callable on its own if you only need one part.

Bought one at a time, these 3 tools cost $0.006 together; the pack is that sum less a 10% bundle discount, rounded up to the $0.001 settlement floor, which is $0.006.

Workflow

  1. Call weather-current with lat and lon to get the real-time snapshot: temperature, wind speed and direction, humidity, apparent temperature, weather condition code. This is the 'what's happening right now' answer. If the response includes a condition like 'Thunderstorm' or wind > 60 km/h, flag it as a severe-weather alert in the final briefing.
  2. Call weather-daily with the same lat and lon (days=7 or the caller's horizon) for the extended forecast. Each day returns high/low temperatures, precipitation probability and sum, max wind gust, and dominant weather code. Scan for any day with precipitation probability > 70% or max gust > 80 km/h and add to a warnings list. Also compute the temperature trend (rising/falling/stable) across the 7 days for a one-line summary.
  3. Call weather-air-quality with the same lat and lon for the current AQI reading: PM2.5, PM10, ozone, NO2, SO2, CO, and the US AQI category (Good/Moderate/Unhealthy/etc.). AQI category 'Unhealthy for Sensitive Groups' or worse should appear as a health advisory in the final briefing. Final payload: { location: {lat, lon}, current: {temperature, feelsLike, humidity, windSpeed, windDirection, condition}, forecast: [{date, high, low, precipProbability, precipSum, maxGust, condition}], airQuality: {aqi, category, pm25, pm10, ozone}, trend: 'warming'|'cooling'|'stable', warnings: [<string flags>] }.

Arguments

NameRequiredDescriptionExample
latyesLatitude of the location (e.g. 48.8566 for Paris)48.8566
lonyesLongitude of the location (e.g. 2.3522 for Paris)2.3522

What one call returns

A JSON object with pack, args, steps, summary; steps holds one entry per tool (weather-current, weather-daily, weather-air-quality), each with its own result or error. Full example on the API page.

Call it directly

Any x402 client pays the 402 and gets the whole workflow back in one response. With the agent402-client SDK (npm i agent402-client, an ES module):

import { Agent402 } from "agent402-client";
// payFetch: an x402-wrapped fetch your wallet signs (@x402/fetch).
// Tools on the free tier need no options: new Agent402() pays them by proof-of-work.
// an existing prepaid credits key also works: new Agent402({ creditsKey })
const client = new Agent402({ fetch: payFetch });
const result = await client.call("skill-weather-brief", {"lat":"48.8566","lon":"2.3522"});

Run it in Claude

claude mcp add agent402 -s user -- npx -y agent402-mcp@latest

Then paste this prompt into Claude:

Generate a weather briefing for coordinates lat=48.8566, lon=2.3522 using Agent402.

(1) weather-current with lat=48.8566, lon=2.3522 - returns {temperature, feelsLike, humidity, windSpeed, windDirection, condition, conditionCode}. Initialize warnings = []. If conditionCode >= 95 (thunderstorm), push 'Thunderstorm in progress'. If windSpeed > 60, push 'High winds (>{windSpeed} km/h)'.

(2) weather-daily with lat=48.8566, lon=2.3522, days=7 - returns {days: [{date, high, low, precipProbability, precipSum, maxGust, condition}]}. For each day: if precipProbability > 70, push 'Rain likely on {date} ({precipProbability}%)'. If maxGust > 80, push 'Strong gusts on {date} ({maxGust} km/h)'. Compute trend: compare days[0].high vs days[6].high - diff > 3 = 'warming', diff < -3 = 'cooling', else 'stable'.

(3) weather-air-quality with lat=48.8566, lon=2.3522 - returns {aqi, category, pm25, pm10, ozone, no2, so2, co}. If category is not 'Good' and not 'Moderate', push 'Air quality advisory: {category}'.

Final return: {location: {lat: 48.8566, lon: 2.3522}, current: <step 1>, forecast: <step 2 days>, airQuality: {aqi, category, pm25, pm10, ozone}, trend: <computed>, warnings}. Budget ~$0.005 paid; all 3 tools are wallet-only (external API calls to Open-Meteo).

← All skill packs