# get_forecast

Get a 7-day weather forecast for any city. Uses Open-Meteo (free, no key) after geocoding the city via Nominatim. Returns daily high/low temps, precipitation, and weather codes. Parameters: city — City name to get forecast for (required), e.g. "London".

Agent View of the PolicyLayer registry record for `get_forecast`. HTML page: https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/get-forecast

## Facts

- Tool: `get_forecast`
- Server: X402 Middleware (`@gadgethumans/x402`) — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware.md
- Install: `npx -y @gadgethumans/x402`
- Homepage: https://github.com/scotia1973-bot/gadgethumans-x402
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server rate-limited: no
- Parameters: 1 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `city` | string | yes |  |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_forecast",
    "arguments": {
      "city": "<city>"
    }
  }
}
```

## Why get_forecast is rated Low

This tool queries weather data from Open-Meteo and Nominatim APIs based on a city parameter. It retrieves and returns structured weather information without any side effects, state changes, or ability to modify data.

From the tool's own definition: "Tool description states it 'Get[s] a 7-day weather forecast' and 'Returns daily high/low temps, precipitation, and weather codes.' The verb 'Get' and 'Returns' indicate data retrieval with no modification, creation, deletion, or execution of external…"

## Use case

AI agents call get_forecast to retrieve information from X402 Middleware without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches X402 Middleware:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "get_forecast": {}
  }
}
```

## Other tools on X402 Middleware (57)

- `agent_memory` — Destructive — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/agent-memory.md
- `wallet_buy` — Financial — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/wallet-buy.md
- `x402_payment_request` — Financial — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/x402-payment-request.md
- `x402_pricing` — Financial — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/x402-pricing.md
- `x402_verify_payment` — Financial — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/x402-verify-payment.md
- `analyze_readability` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/analyze-readability.md
- `analyze_url` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/analyze-url.md
- `bmr_calc` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/bmr-calc.md
- `calculate_bmi` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/calculate-bmi.md
- `calculate_date` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/calculate-date.md
- `check_ssl_certificate` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/check-ssl-certificate.md
- `classify` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/classify.md
- `compare_items` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/compare-items.md
- `convert_currency` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/convert-currency.md
- `convert_timestamp` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/convert-timestamp.md
- `convert_timezone` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/convert-timezone.md
- `decode_jwt` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/decode-jwt.md
- `detect_language` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/detect-language.md
- `dns_lookup` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/dns-lookup.md
- `extract_contacts` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/extract-contacts.md
- `generate_seo_metadata` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/generate-seo-metadata.md
- `generate_uuid` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/generate-uuid.md
- `geocode` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/geocode.md
- `geolocate_ip` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/geolocate-ip.md
- `get_air_quality` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/get-air-quality.md
- `get_crypto_prices` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/get-crypto-prices.md
- `get_og_metadata` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/get-og-metadata.md
- `get_weather` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/get-weather.md
- `grammar` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/grammar.md
- `hash_text` — Read — https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware/hash-text.md
- …and 27 more: https://policylayer.com/tools/com-gadgethumans-swarm-x402-middleware.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-gadgethumans-swarm-x402-middleware · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-gadgethumans-swarm-x402-middleware
