Skip to main content
Glama

Weather forecast (30 sats L402 or $0.025 USDC x402)

get_weather_forecast
Read-only

Hourly plus 7-day forecast for lat/lon or a US city/ZIP — use this to plan the next hours or days. Price: 30 sats (Lightning) or $0.025 USDC on Base (x402). Sample (illustrative, not live): {"status":"success","endpoint":"weather_forecast","data":{"coverage":"us","source":"noaa_nws","place":{"lat":30.27,"lon":-97.74,"city":"Austin","state":"TX"},"forecast":{"updated":"2026-11-15T18:00:00Z","daily":[{"name":"This Afternoon","start":"2026-11-15T13:00:00-06:00","temperature":58,"short_forecast":"Cloudy"}],"hourly":[{"start":"2026-11-15T14:00:00-06:00","temperature":57,"short_forecast":"Cloudy"}]}},"metadata":{"cost_sats":30}} Pay: Call it, get HTTP 402 (or MCP payment_required) with a Lightning invoice and macaroon, pay the invoice, then retry with Authorization: L402 <macaroon>:<preimage>. Or pay in USDC on Base via x402: sign the 402's x402 requirement (PAYMENT-REQUIRED header, or accepts in the JSON body) and retry with the PAYMENT-SIGNATURE (x402 v2) or X-PAYMENT (v1) header; only a 200 is settled.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_weather_forecast"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoSame as location: US city or ZIP.
latNoLatitude (−90 to 90). Use with lon.
lonNoLongitude (−180 to 180). Use with lat.
zipNo5-digit US ZIP code.
stateNoUS state or territory code (alerts only), e.g. TX.
locationNoUS city ('Austin, TX') or 5-digit ZIP. Alias: q.
x402_paymentNoOptional x402 payment (USDC on Base): base64 PaymentPayload (v2, or v1 X-PAYMENT format) signed for accepts[0] of this tool's payment_required result. Alternative to params._meta['x402/payment']. Omit both to receive the payment requirements.
l402_credentialNoOptional L402 credential '<macaroon>:<preimage_hex>' (or 'L402 <macaroon>:<preimage>') from a paid invoice or an active subscription. Omit it to receive the Lightning invoice and macaroon.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / x402_payment
      Added value: +{
      +  "description": "Optional x402 payment (USDC on Base): base64 PaymentPayload (v2, or v1 X-PAYMENT format) signed for accepts[0] of this tool's payment_required result. Alternative to params._meta['x402/payment']. Omit both to receive the payment requirements.",
      +  "type": "string"
      +}
  2. Added

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint and openWorldHint; the description adds the material behavior: paywalled access at 30 sats / $0.025 USDC, the 402-then-retry handshake with L402 macaroon or x402 PAYMENT-SIGNATURE, and that only a 200 counts as settled. Coverage is also disclosed as US-only via noaa_nws, which matters for lat/lon callers outside the US. The illustrative sample is labeled as not live, so it adds expectation-setting rather than hard contract detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is correctly front-loaded in sentence one, but the description then runs long: a full fake JSON response body plus two paragraphs of L402/x402 protocol detail. The protocol text earns its place for a paid tool, while the inline sample is the weakest block since it is explicitly illustrative and not live.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, no-output-schema, payment-gated tool, the description supplies the response shape, the settlement rule, the coverage domain, and the auth flow, which covers most of what an agent needs. The remaining gap is that zero parameters are required and the description never says what happens if none of q/lat/lon/zip/location is supplied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns a bump by explaining the ordering semantics of l402_credential and x402_payment — omit them to receive payment requirements, then retry with the credential. It also clarifies that lat/lon pair with each other and that city/ZIP is the alternative locator path, which the schema documents individually but not as a choice.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific resource (hourly + 7-day forecast), the accepted locators (lat/lon or US city/ZIP), and the intended use (planning the next hours or days). That content scope implicitly separates it from get_weather_current and get_weather_alerts, but no sibling is named, so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this to plan the next hours or days' implies a horizon-based use case, and the payment paragraph explains the retry sequence after a 402. There is no explicit when-not guidance and no statement of how this differs from get_weather_current or get_weather_alerts, which is the main decision an agent faces here.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources