@cyanheads/noaa-spaceweather-mcp-server 0.1.14 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/README.md +18 -11
  4. package/changelog/0.2.x/0.2.0.md +21 -0
  5. package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts +21 -8
  6. package/dist/mcp-server/tools/definitions/get-conditions.tool.d.ts.map +1 -1
  7. package/dist/mcp-server/tools/definitions/get-conditions.tool.js +227 -38
  8. package/dist/mcp-server/tools/definitions/get-conditions.tool.js.map +1 -1
  9. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts +25 -1
  10. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js +220 -33
  12. package/dist/mcp-server/tools/definitions/get-solar-activity.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts +10 -0
  14. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js +142 -20
  16. package/dist/mcp-server/tools/definitions/get-solar-wind.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/index.d.ts +56 -9
  18. package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
  19. package/dist/services/space-weather/space-weather-service.d.ts +34 -2
  20. package/dist/services/space-weather/space-weather-service.d.ts.map +1 -1
  21. package/dist/services/space-weather/space-weather-service.js +265 -52
  22. package/dist/services/space-weather/space-weather-service.js.map +1 -1
  23. package/dist/services/space-weather/types.d.ts +119 -9
  24. package/dist/services/space-weather/types.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-spaceweather-mcp-server
4
- **Version:** 0.1.14
4
+ **Version:** 0.2.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.3`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-spaceweather-mcp-server
4
- **Version:** 0.1.14
4
+ **Version:** 0.2.0
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.3`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0 (protocol revisions 2026-07-28 and 2025-*)
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.14-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/noaa-spaceweather-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/noaa-spaceweather-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.2.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/noaa-spaceweather-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/noaa-spaceweather-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -35,21 +35,23 @@ Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic
35
35
 
36
36
  | Tool | Description |
37
37
  |:-----|:------------|
38
- | `noaa_spaceweather_get_conditions` | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, and a plain-language status summary |
38
+ | `noaa_spaceweather_get_conditions` | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, a plain-language status summary, and optionally SWPC's forecast discussion explaining the forecast |
39
39
  | `noaa_spaceweather_get_kp_index` | Planetary K-index (0–9) — recent observed 3-hour values with G-scale equivalents and aurora-latitude guidance, plus 3-day forecast |
40
40
  | `noaa_spaceweather_get_aurora_forecast` | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with go/no-go verdict |
41
- | `noaa_spaceweather_get_solar_wind` | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component — explains why current geomagnetic conditions exist |
42
- | `noaa_spaceweather_get_solar_activity` | Solar flare picture: GOES X-ray flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |
41
+ | `noaa_spaceweather_get_solar_wind` | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component with the window's most southward reading — explains why current geomagnetic conditions exist |
42
+ | `noaa_spaceweather_get_solar_activity` | Solar flare picture: discrete flare events with peak class and R-scale level, GOES X-ray flux, the daily F10.7 cm radio flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |
43
43
  | `noaa_spaceweather_get_alerts` | Active SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text |
44
44
 
45
45
  ## Capability reference
46
46
 
47
47
  ### `noaa_spaceweather_get_conditions` <sub>tool</sub>
48
48
 
49
- - No inputs — a single call composing storm scales and current Kp into one snapshot
50
- - Returns today's R/S/G storm scales plus a 3-day forecast series
49
+ - `include_discussion` (bool, default false) is the only input — otherwise a single call composing storm scales and current Kp into one snapshot
50
+ - Returns today's observed R/S/G storm levels plus SWPC's 3-day forecast series, which starts with today
51
+ - Forecast days carry what SWPC issues: a G level, and for R and S a probability — R1–R2, R3 or greater, S1 or greater — with no level. A null level means SWPC forecasts none for that day, which is not the same as level 0
51
52
  - Current Kp with G-scale equivalent and aurora-visibility latitude guidance
52
- - Data sourced from the `noaa-scales.json` + `noaa-planetary-k-index.json` feeds
53
+ - With `include_discussion`, the forecaster-written Forecast Discussion split into its topic sections (Solar Activity, Energetic Particle, Solar Wind, Geospace), each with its 24-hour summary and 3-day forecast text
54
+ - Data sourced from the `noaa-scales.json` + `noaa-planetary-k-index.json` feeds, plus the `discussion.txt` product when the discussion is requested
53
55
 
54
56
  ---
55
57
 
@@ -75,8 +77,9 @@ Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic
75
77
  ### `noaa_spaceweather_get_solar_wind` <sub>tool</sub>
76
78
 
77
79
  - `window_hours` (1–168, default 3) slices client-side from a feed that carries roughly the last 24 hours at ~1-minute cadence
80
+ - `resolution` (`reduced` default, or `full`) bounds each returned series to 200 records: the window is bucketed by record count and one real measurement is emitted per bucket — the bucket's fastest speed for plasma, its most southward Bz for mag — with the newest record in the window always last. A series already inside the bound comes back untouched, so a default 3-hour call is unaffected; `full` returns every record (~1,400 per series over 24 hours)
78
81
  - Plasma (speed, density, temperature) and magnetic field (Bx/By/Bz/Bt GSM) returned as separate oldest-first series
79
- - `bzStatus` surfaces southward Bz (the storm driver) as a plain-language field
82
+ - `bzStatus` surfaces southward Bz (the storm driver) as a plain-language field, and `bzMinInWindow` with its time tag reports the window's most southward reading — both computed from the full window, before any reduction
80
83
  - `latestFeedPlasmaTime`/`latestFeedMagTime`/`feedStalenessHours` distinguish an empty window from a stale feed
81
84
  - Every record names its reporting spacecraft — no satellite is assumed as "the" active one
82
85
 
@@ -85,9 +88,13 @@ Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic
85
88
  ### `noaa_spaceweather_get_solar_activity` <sub>tool</sub>
86
89
 
87
90
  - `include_regions` (default true) toggles per-region active-solar-region detail to control response size
88
- - GOES X-ray flux (0.1–0.8 nm) with flare-class letter (A/B/C/M/X); recent readings cover the past hour
91
+ - `flare_hours` (1–168, default 24) bounds the discrete flare events returned, filtered on each flare's onset; the feed keeps a rolling 7 days, so 168 returns everything it carries
92
+ - Flare events come with the classes SWPC publishes — onset, peak, and decay, each with magnitude — the peak flux, and the NOAA R-scale level (0–5) that flux implies. Decay time and class are null while a flare is still in progress, and an empty window names the newest flare the feed holds
93
+ - GOES X-ray flux (0.1–0.8 nm) with flare-class letter (A/B/C/M/X), the class with magnitude (`flareClassFull`, derived by SWPC's truncation rule so it agrees with the published flare classes), and the unformatted flux alongside the display string; recent readings cover the past hour
94
+ - Daily F10.7 cm solar radio flux in sfu with its 90-day mean, from the Noon Penticton report — the value SWPC reports for the day. It can be up to ~24 h old, so its observation time rides with it
89
95
  - 3-day C/M/X flare-class and proton-event probabilities, each duplicated under a legacy `*1Day` name and a date-neutral name
90
96
  - Integral proton flux (≥10 MeV) drives the reported NOAA S-scale (0–5)
97
+ - Data sourced from the `goes/primary/xrays-6-hour.json`, `goes/primary/xray-flares-7-day.json`, `f107_cm_flux.json`, `solar_probabilities.json`, `goes/primary/integral-protons-plot-3-day.json`, and `solar_regions.json` feeds
91
98
 
92
99
  ---
93
100
 
@@ -108,8 +115,8 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
108
115
  SWPC-specific:
109
116
 
110
117
  - All SWPC feeds are public and keyless — no API keys required
111
- - Single `SpaceWeatherService` wraps all six NOAA SWPC JSON feeds with `fetchWithTimeout` + `withRetry`
112
- - Heterogeneous feed normalization: interleaved multi-spacecraft records (solar wind), keyed objects (storm scales), coordinate triples (OVATION)
118
+ - Single `SpaceWeatherService` wraps every NOAA SWPC feed — the JSON products and the plain-text forecast discussion — behind one `fetchWithTimeout` + `withRetry` funnel, so both paths classify an upstream failure the same way
119
+ - Heterogeneous feed normalization: interleaved multi-spacecraft records (solar wind), keyed objects (storm scales), coordinate triples (OVATION), section-delimited text (forecast discussion)
113
120
  - NOAA scale interpretation: raw Kp 6 → "G2 moderate storm — aurora possible to ~55° geomagnetic latitude"
114
121
  - Feed freshness surfaced per-response: solar wind updates ~1 min, aurora ~5 min, Kp 3-hour intervals
115
122
 
@@ -0,0 +1,21 @@
1
+ ---
2
+ summary: "Forecast R/S probabilities replace a phantom scale 0, discrete flare history and F10.7 flux, solar wind series bounded to 200 records, and an optional SWPC forecast discussion."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.0 — 2026-09-17
8
+
9
+ ## Added
10
+
11
+ - **`get_solar_wind`:** `resolution` input (`reduced`/`full`, default `reduced`) bounds `plasma`/`mag` to 200 records each — one real measurement per bucket (fastest speed for plasma, most southward Bz for mag), newest record always last. A default 3-hour call is unaffected; a 24-hour call drops from ~541 KB to roughly the size of today's default call (~68 KB). Adds `bzMinInWindow` + `bzMinTimeTag`, computed from the full window before reduction. [#24](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/24)
12
+ - **`get_solar_activity`:** `recentFlares[]` — discrete GOES flare events from `xray-flares-7-day.json`, filtered by the new `flare_hours` input (1–168, default 24), with peak class, R-scale level, and begin/max/end times and classes. [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
13
+ - **`get_solar_activity`:** `f107` — the latest daily F10.7 cm solar radio flux (the Noon Penticton report, matching SWPC's own daily summary), with its 90-day mean when available. [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
14
+ - **`get_solar_activity`:** `XraySchema` gains `flareClassFull` (class with magnitude, e.g. `"M5.2"`, truncated to match SWPC's own rounding) and `fluxWm2Value` (unformatted flux, for comparison without parsing `fluxWm2`). [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
15
+ - **`get_conditions`:** `include_discussion` input + `discussion` output — SWPC's forecaster-written Forecast Discussion, parsed into per-topic sections (summary/forecast text). [#32](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/32)
16
+
17
+ ## Changed
18
+
19
+ - **Breaking:** `get_conditions.forecast[].R`/`.S` no longer coerce SWPC's null forecast scale to `0`. Forecast days now carry a nullable `scale`/`text`/`label` plus probability fields — `minorProbPercent`/`majorProbPercent` for R, `probPercent` for S — since SWPC issues a probability, not a level, for future days. `today` and `forecast[].G` are unaffected. [#23](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/23)
20
+ - **Breaking:** `get_conditions.observedAt` is now ISO 8601 UTC (`"2026-09-17T17:15:00Z"`) instead of the space-separated `"2026-09-17 17:15:00"`. [#23](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/23)
21
+ - `get_solar_activity`'s X-ray flux feed swapped from `xrays-7-day.json` to `xrays-6-hour.json` — byte-identical records for the tool's past-hour slice, ~4.52 MB → ~162 KB per call. [#31](https://github.com/cyanheads/noaa-spaceweather-mcp-server/issues/31)
@@ -4,7 +4,9 @@
4
4
  */
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
- export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
7
+ export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
+ include_discussion: z.ZodDefault<z.ZodBoolean>;
9
+ }, z.core.$strip>, z.ZodObject<{
8
10
  observedAt: z.ZodString;
9
11
  currentKp: z.ZodNumber;
10
12
  currentGScale: z.ZodNumber;
@@ -34,17 +36,28 @@ export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinit
34
36
  label: z.ZodString;
35
37
  }, z.core.$strip>;
36
38
  R: z.ZodObject<{
37
- scale: z.ZodNumber;
38
- text: z.ZodString;
39
- label: z.ZodString;
39
+ scale: z.ZodNullable<z.ZodNumber>;
40
+ text: z.ZodNullable<z.ZodString>;
41
+ label: z.ZodNullable<z.ZodString>;
42
+ minorProbPercent: z.ZodNullable<z.ZodNumber>;
43
+ majorProbPercent: z.ZodNullable<z.ZodNumber>;
40
44
  }, z.core.$strip>;
41
45
  S: z.ZodObject<{
42
- scale: z.ZodNumber;
43
- text: z.ZodString;
44
- label: z.ZodString;
46
+ scale: z.ZodNullable<z.ZodNumber>;
47
+ text: z.ZodNullable<z.ZodString>;
48
+ label: z.ZodNullable<z.ZodString>;
49
+ probPercent: z.ZodNullable<z.ZodNumber>;
45
50
  }, z.core.$strip>;
46
51
  }, z.core.$strip>>;
47
52
  summary: z.ZodString;
53
+ discussion: z.ZodNullable<z.ZodObject<{
54
+ issued: z.ZodNullable<z.ZodString>;
55
+ sections: z.ZodArray<z.ZodObject<{
56
+ topic: z.ZodString;
57
+ summary: z.ZodNullable<z.ZodString>;
58
+ forecast: z.ZodNullable<z.ZodString>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>>;
48
61
  }, z.core.$strip>, readonly [{
49
62
  readonly reason: "feed_unavailable";
50
63
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
@@ -54,7 +67,7 @@ export declare const getConditions: import("@cyanheads/mcp-ts-core").ToolDefinit
54
67
  }, {
55
68
  readonly reason: "feed_moved";
56
69
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
57
- readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or the scales feed no longer carries its \"0\" (today) period. Fails in one attempt.";
70
+ readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or a feed answers without the shape it is documented to have — the scales feed no longer carrying its \"0\" (today) period, or the forecast discussion carrying no topic section. Fails in one attempt.";
58
71
  readonly retryable: false;
59
72
  readonly recovery: "Retrying will not help — the SWPC feed path no longer resolves or no longer has the expected shape; the feed URL needs updating against SWPC current inventory.";
60
73
  }], undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-conditions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-conditions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0BjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2JxB,CAAC"}
1
+ {"version":3,"file":"get-conditions.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-conditions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAiNjE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmNxB,CAAC"}
@@ -15,28 +15,172 @@ const ScaleSummarySchema = z
15
15
  label: z.string().describe('NOAA scale string, e.g. "G2", "R1", "S0".'),
16
16
  })
17
17
  .describe('Current level and label for one NOAA storm scale category.');
18
+ /**
19
+ * SWPC issues no R or S *level* for a future day — it issues a probability. So the
20
+ * forecast entries carry a nullable scale alongside the probabilities, while `today`
21
+ * and `forecast[].G` keep {@link ScaleSummarySchema}: those do carry a real level.
22
+ * The R/S asymmetry is upstream's — two probabilities for R, one for S.
23
+ */
24
+ const RadioForecastSchema = z
25
+ .object({
26
+ scale: z
27
+ .number()
28
+ .nullable()
29
+ .describe('R-scale level 0–5, or null — SWPC forecasts a radio-blackout probability for a future day rather than a level.'),
30
+ text: z
31
+ .string()
32
+ .nullable()
33
+ .describe('Human-readable R-scale descriptor, or null when no level was issued.'),
34
+ label: z
35
+ .string()
36
+ .nullable()
37
+ .describe('NOAA scale string, e.g. "R1", or null when no level was issued.'),
38
+ minorProbPercent: z
39
+ .number()
40
+ .nullable()
41
+ .describe('Probability (%) of an R1–R2 minor-to-moderate radio blackout on this day, or null when SWPC issued none.'),
42
+ majorProbPercent: z
43
+ .number()
44
+ .nullable()
45
+ .describe('Probability (%) of an R3 or greater strong radio blackout on this day, or null when SWPC issued none.'),
46
+ })
47
+ .describe('Forecast radio blackout outlook for one day — a level, a probability, or neither.');
48
+ const RadiationForecastSchema = z
49
+ .object({
50
+ scale: z
51
+ .number()
52
+ .nullable()
53
+ .describe('S-scale level 0–5, or null — SWPC forecasts a radiation-storm probability for a future day rather than a level.'),
54
+ text: z
55
+ .string()
56
+ .nullable()
57
+ .describe('Human-readable S-scale descriptor, or null when no level was issued.'),
58
+ label: z
59
+ .string()
60
+ .nullable()
61
+ .describe('NOAA scale string, e.g. "S1", or null when no level was issued.'),
62
+ probPercent: z
63
+ .number()
64
+ .nullable()
65
+ .describe('Probability (%) of an S1 or greater solar radiation storm on this day, or null when SWPC issued none.'),
66
+ })
67
+ .describe('Forecast solar radiation storm outlook for one day — a level, a probability, or neither.');
18
68
  const ForecastPeriodSchema = z
19
69
  .object({
20
- date: z.string().describe('Forecast date string.'),
21
- G: ScaleSummarySchema.describe('Geomagnetic storm scale for this day.'),
22
- R: ScaleSummarySchema.describe('Radio blackout scale for this day.'),
23
- S: ScaleSummarySchema.describe('Solar radiation storm scale for this day.'),
70
+ date: z.string().describe('Forecast date string, e.g. "2026-06-04".'),
71
+ G: ScaleSummarySchema.describe('Geomagnetic storm scale forecast for this day.'),
72
+ R: RadioForecastSchema.describe('Radio blackout outlook for this day.'),
73
+ S: RadiationForecastSchema.describe('Solar radiation storm outlook for this day.'),
24
74
  })
25
- .describe('3-day NOAA scale forecast for one calendar day.');
75
+ .describe('One day of the NOAA scale forecast series.');
76
+ const DiscussionSchema = z
77
+ .object({
78
+ issued: z
79
+ .string()
80
+ .nullable()
81
+ .describe('ISO 8601 UTC time the discussion was issued, from the product\'s ":Issued:" line, e.g. "2026-06-04T12:30:00Z". Null when the product carries no such line.'),
82
+ sections: z
83
+ .array(z
84
+ .object({
85
+ topic: z
86
+ .string()
87
+ .describe('Section heading, e.g. "Solar Activity", "Energetic Particle", "Solar Wind", "Geospace".'),
88
+ summary: z
89
+ .string()
90
+ .nullable()
91
+ .describe('Past-24 h summary text, or null when the section carries no ".24 hr Summary..." text.'),
92
+ forecast: z
93
+ .string()
94
+ .nullable()
95
+ .describe('Forecast text for the next 3 days, or null when the section carries no ".Forecast..." block.'),
96
+ })
97
+ .describe("One topic section of the discussion — its heading and the forecaster's text."))
98
+ .describe('One entry per topic section, in product order.'),
99
+ })
100
+ .describe("SWPC Forecast Discussion — the forecaster's narrative behind the storm scales. Null when include_discussion is false.");
101
+ // ── Normalization helpers ───────────────────────────────────────────────────
102
+ /** Join the present fragments of a phrase, so an absent descriptor leaves no gap. */
103
+ function joinWords(words) {
104
+ return words.filter((word) => Boolean(word)).join(' ');
105
+ }
106
+ /**
107
+ * Map a level-carrying entry onto {@link ScaleSummarySchema}, which declares `scale` as
108
+ * a plain number: today's period and every forecast G entry do carry a real `Scale`
109
+ * upstream.
110
+ *
111
+ * A null one is not resolved to 0. That is the claim #23 removed from the forecast R/S
112
+ * — "level 0, no storm" is a different statement from "SWPC issued no level" — and it
113
+ * would read the same way here, on a surface with no probability to fall back to. The
114
+ * period instead reports the shape break it is, on the reason the tool already declares
115
+ * for a feed that answers without its documented shape.
116
+ */
117
+ function observedScale(entry, period, fail) {
118
+ if (entry.scale === null)
119
+ throw fail(`SWPC scales feed issued no ${entry.category} level for the ${period} period.`);
120
+ return {
121
+ scale: entry.scale,
122
+ text: entry.text ?? '',
123
+ label: `${entry.category}${entry.scale}`,
124
+ };
125
+ }
126
+ /**
127
+ * Map the level half of a forecast R/S entry, preserving a null SWPC issued no level
128
+ * for. `label` is null in lockstep with `scale` — there is no "R" string to build
129
+ * without a number.
130
+ */
131
+ function forecastLevel(entry) {
132
+ return {
133
+ scale: entry.scale,
134
+ text: entry.text,
135
+ label: entry.scale === null ? null : `${entry.category}${entry.scale}`,
136
+ };
137
+ }
138
+ /**
139
+ * Render one forecast R/S cell for `format()`.
140
+ *
141
+ * The level and the probabilities render independently. Gating the probabilities on a
142
+ * null level would leave them unrendered for a schema-valid combination — a day with
143
+ * both — so a probability is shown whenever SWPC issued one. A day upstream issued
144
+ * neither a level nor a probability for reads "—" rather than claiming level 0.
145
+ */
146
+ function forecastCell(category, entry, probabilities) {
147
+ const level = joinWords([
148
+ entry.scale === null ? entry.label : `${entry.label ?? category} (scale ${entry.scale})`,
149
+ // "none" alongside an explicit level 0 adds nothing.
150
+ entry.text && entry.text.toLowerCase() !== 'none' ? entry.text : null,
151
+ ]);
152
+ const chances = probabilities
153
+ .filter((probability) => probability[0] !== null)
154
+ .map(([percent, of]) => `${percent}% ${of}`)
155
+ .join(', ');
156
+ return `${category}: ${[level, chances].filter(Boolean).join(' · ') || '—'}`;
157
+ }
158
+ /** The "G2 moderate geomagnetic storm" fragment for an in-progress storm, else null. */
159
+ function stormPhrase(entry, phenomenon) {
160
+ if (entry.scale === null || entry.scale < 1)
161
+ return null;
162
+ return joinWords([`${entry.category}${entry.scale}`, entry.text?.toLowerCase(), phenomenon]);
163
+ }
26
164
  // ── Tool ────────────────────────────────────────────────────────────────────
27
165
  export const getConditions = tool('noaa_spaceweather_get_conditions', {
28
166
  title: 'Get Space Weather Conditions',
29
167
  description: 'Current space-weather snapshot: NOAA R/S/G storm scales (today + 3-day forecast), latest Kp ' +
30
168
  'index with its G-scale equivalent and aurora-visibility latitude, and a plain-language status ' +
31
- 'summary. The quickest way to answer "is anything happening right now?" — use before deciding ' +
169
+ 'summary. Optionally includes the SWPC forecast discussion explaining what is driving the ' +
170
+ 'forecast. The quickest way to answer "is anything happening right now?" — use before deciding ' +
32
171
  'whether to drill into solar wind (noaa_spaceweather_get_solar_wind), aurora ' +
33
172
  '(noaa_spaceweather_get_aurora_forecast), or alert details (noaa_spaceweather_get_alerts).',
34
173
  annotations: { readOnlyHint: true, openWorldHint: true, idempotentHint: true },
35
- input: z.object({}),
174
+ input: z.object({
175
+ include_discussion: z
176
+ .boolean()
177
+ .default(false)
178
+ .describe("Also fetch SWPC's forecaster-written Forecast Discussion, which explains why the forecast looks the way it does (CME versus coronal-hole stream, expected arrival). Costs one extra upstream request."),
179
+ }),
36
180
  output: z.object({
37
181
  observedAt: z
38
182
  .string()
39
- .describe('UTC date and time of the NOAA scales data period this snapshot reflects, e.g. "2026-06-04 15:00:00".'),
183
+ .describe('ISO 8601 UTC date and time of the NOAA scales data period this snapshot reflects, e.g. "2026-06-04T15:00:00Z".'),
40
184
  currentKp: z.number().describe('Latest observed planetary K-index (0–9).'),
41
185
  currentGScale: z.number().describe('NOAA G-scale equivalent for current Kp (0–5).'),
42
186
  auroraLatitude: z
@@ -49,10 +193,13 @@ export const getConditions = tool('noaa_spaceweather_get_conditions', {
49
193
  S: ScaleSummarySchema.describe("Today's solar radiation storm scale."),
50
194
  })
51
195
  .describe('Current observed NOAA storm scales for today.'),
52
- forecast: z.array(ForecastPeriodSchema).describe('3-day NOAA scale forecast (next 1–3 days).'),
196
+ forecast: z
197
+ .array(ForecastPeriodSchema)
198
+ .describe("SWPC's 3-day NOAA scale forecast, oldest first. The series starts with today — the same calendar day as observedAt — and covers the next two days."),
53
199
  summary: z
54
200
  .string()
55
201
  .describe('Plain-language status summary suitable for display, e.g. "Quiet conditions" or "G2 moderate geomagnetic storm in progress."'),
202
+ discussion: DiscussionSchema.nullable().describe('SWPC Forecast Discussion when include_discussion is true, otherwise null.'),
56
203
  }),
57
204
  errors: [
58
205
  {
@@ -65,15 +212,21 @@ export const getConditions = tool('noaa_spaceweather_get_conditions', {
65
212
  {
66
213
  reason: 'feed_moved',
67
214
  code: JsonRpcErrorCode.ServiceUnavailable,
68
- when: 'SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or the scales feed no longer carries its "0" (today) period. Fails in one attempt.',
215
+ when: 'SWPC feed path returns a permanent 4xx (404, 410, 401, 403), or a feed answers without the shape it is documented to have — the scales feed no longer carrying its "0" (today) period, or the forecast discussion carrying no topic section. Fails in one attempt.',
69
216
  retryable: false,
70
217
  recovery: 'Retrying will not help — the SWPC feed path no longer resolves or no longer has the expected shape; the feed URL needs updating against SWPC current inventory.',
71
218
  },
72
219
  ],
73
- async handler(_input, ctx) {
74
- ctx.log.info('Fetching current space weather conditions');
220
+ async handler(input, ctx) {
221
+ ctx.log.info('Fetching current space weather conditions', {
222
+ includeDiscussion: input.include_discussion,
223
+ });
75
224
  const svc = getSpaceWeatherService();
76
- const [scales, kpObs] = await Promise.all([svc.getNoaaScales(ctx), svc.getKpObserved(ctx)]);
225
+ const [scales, kpObs, discussion] = await Promise.all([
226
+ svc.getNoaaScales(ctx),
227
+ svc.getKpObserved(ctx),
228
+ input.include_discussion ? svc.getForecastDiscussion(ctx) : null,
229
+ ]);
77
230
  // Latest Kp is the last element of the observed array
78
231
  const latestKp = kpObs.length > 0 ? kpObs[kpObs.length - 1] : null;
79
232
  const currentKp = latestKp?.kp ?? 0;
@@ -81,13 +234,11 @@ export const getConditions = tool('noaa_spaceweather_get_conditions', {
81
234
  const auroraLatitude = latestKp?.auroraLatitude ?? 'No significant aurora expected at mid-latitudes';
82
235
  const today = scales.today;
83
236
  // Build summary — incorporate both current conditions and notable forecast activity.
84
- const parts = [];
85
- if (today.G.scale >= 1)
86
- parts.push(`G${today.G.scale} ${today.G.text.toLowerCase()} geomagnetic storm`);
87
- if (today.R.scale >= 1)
88
- parts.push(`R${today.R.scale} ${today.R.text.toLowerCase()} radio blackout`);
89
- if (today.S.scale >= 1)
90
- parts.push(`S${today.S.scale} ${today.S.text.toLowerCase()} solar radiation storm`);
237
+ const parts = [
238
+ stormPhrase(today.G, 'geomagnetic storm'),
239
+ stormPhrase(today.R, 'radio blackout'),
240
+ stormPhrase(today.S, 'solar radiation storm'),
241
+ ].filter((phrase) => phrase !== null);
91
242
  let summary;
92
243
  if (parts.length > 0) {
93
244
  summary =
@@ -95,37 +246,50 @@ export const getConditions = tool('noaa_spaceweather_get_conditions', {
95
246
  ' in progress.';
96
247
  }
97
248
  else {
98
- // Check forecast for upcoming elevated activity — pick the highest G-scale day.
99
- let peakScale = 0;
100
- let peakDate = '';
249
+ // Check the forecast for upcoming elevated activity — the highest G-scale day.
250
+ // The descriptor rides along with the peak instead of being looked up by date
251
+ // afterwards: the series opens on today, so a date does not identify a period.
252
+ let peak = null;
101
253
  for (const p of scales.forecast) {
102
- if (p.G.scale > peakScale) {
103
- peakScale = p.G.scale;
104
- peakDate = p.date;
254
+ if (p.G.scale !== null && p.G.scale > (peak?.scale ?? 0)) {
255
+ peak = { date: p.date, scale: p.G.scale, text: p.G.text };
105
256
  }
106
257
  }
258
+ // The series starts with today, so naming its date would read as a future day.
259
+ const when = peak === null || peak.date === today.date ? 'today' : peak.date;
107
260
  summary =
108
- peakScale >= 1
109
- ? `Quiet now — G${peakScale} ${scales.forecast.find((p) => p.date === peakDate)?.G.text.toLowerCase()} geomagnetic storm forecast for ${peakDate}.`
110
- : 'Quiet conditions — no significant storms active.';
261
+ peak === null
262
+ ? 'Quiet conditions — no significant storms active.'
263
+ : `Quiet now — ${joinWords([`G${peak.scale}`, peak.text?.toLowerCase(), 'geomagnetic storm'])} forecast for ${when}.`;
111
264
  }
265
+ /** A missing level is a feed shape break — see {@link observedScale}. */
266
+ const failOnMissingLevel = (message) => ctx.fail('feed_moved', message, ctx.recoveryFor('feed_moved'));
112
267
  return {
113
- observedAt: `${today.date} ${today.time}`,
268
+ observedAt: today.observedAt,
114
269
  currentKp,
115
270
  currentGScale,
116
271
  auroraLatitude,
117
272
  today: {
118
- G: { scale: today.G.scale, text: today.G.text, label: `G${today.G.scale}` },
119
- R: { scale: today.R.scale, text: today.R.text, label: `R${today.R.scale}` },
120
- S: { scale: today.S.scale, text: today.S.text, label: `S${today.S.scale}` },
273
+ G: observedScale(today.G, 'today', failOnMissingLevel),
274
+ R: observedScale(today.R, 'today', failOnMissingLevel),
275
+ S: observedScale(today.S, 'today', failOnMissingLevel),
121
276
  },
122
277
  forecast: scales.forecast.map((p) => ({
123
278
  date: p.date,
124
- G: { scale: p.G.scale, text: p.G.text, label: `G${p.G.scale}` },
125
- R: { scale: p.R.scale, text: p.R.text, label: `R${p.R.scale}` },
126
- S: { scale: p.S.scale, text: p.S.text, label: `S${p.S.scale}` },
279
+ G: observedScale(p.G, `${p.date} forecast`, failOnMissingLevel),
280
+ R: {
281
+ ...forecastLevel(p.R),
282
+ minorProbPercent: p.R.minorProb,
283
+ majorProbPercent: p.R.majorProb,
284
+ },
285
+ S: {
286
+ ...forecastLevel(p.S),
287
+ // SWPC gives S a single "Prob"; the service parks it in minorProb.
288
+ probPercent: p.S.minorProb,
289
+ },
127
290
  })),
128
291
  summary,
292
+ discussion,
129
293
  };
130
294
  },
131
295
  format: (result) => {
@@ -144,9 +308,34 @@ export const getConditions = tool('noaa_spaceweather_get_conditions', {
144
308
  lines.push(`- **Solar Radiation (S):** ${result.today.S.label} (scale ${result.today.S.scale}) ${scaleText(result.today.S.text)}`);
145
309
  if (result.forecast.length > 0) {
146
310
  lines.push('');
147
- lines.push('### 3-Day Forecast');
311
+ lines.push('### 3-Day Forecast (starts today)');
148
312
  for (const day of result.forecast) {
149
- lines.push(`**${day.date}:** ${day.G.label} (scale ${day.G.scale}) ${scaleText(day.G.text)} | ${day.R.label} (scale ${day.R.scale}) ${scaleText(day.R.text)} | ${day.S.label} (scale ${day.S.scale}) ${scaleText(day.S.text)}`);
313
+ const cells = [
314
+ `${day.G.label} (scale ${day.G.scale}) ${scaleText(day.G.text)}`,
315
+ forecastCell('R', day.R, [
316
+ [day.R.minorProbPercent, 'R1–R2'],
317
+ [day.R.majorProbPercent, 'R3+'],
318
+ ]),
319
+ forecastCell('S', day.S, [[day.S.probPercent, 'S1+']]),
320
+ ];
321
+ lines.push(`**${day.date}:** ${cells.join(' | ')}`);
322
+ }
323
+ }
324
+ if (result.discussion) {
325
+ lines.push('');
326
+ lines.push('### SWPC Forecast Discussion');
327
+ lines.push(result.discussion.issued === null
328
+ ? '_Issue time not stated in the product._'
329
+ : `_Issued ${result.discussion.issued}_`);
330
+ for (const section of result.discussion.sections) {
331
+ lines.push('');
332
+ lines.push(`**${section.topic}**`);
333
+ if (section.summary)
334
+ lines.push(`_Past 24 h:_ ${section.summary}`);
335
+ if (section.forecast)
336
+ lines.push(`_Forecast:_ ${section.forecast}`);
337
+ if (!section.summary && !section.forecast)
338
+ lines.push('_No text in this section._');
150
339
  }
151
340
  }
152
341
  return [{ type: 'text', text: lines.join('\n') }];
@@ -1 +1 @@
1
- {"version":3,"file":"get-conditions.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-conditions.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAE3F,+EAA+E;AAE/E,MAAM,kBAAkB,GAAG,CAAC;KACzB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAw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AI,OAAO,CAAC,QAAQ;oBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACpE,IAAI,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ;oBAAE,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;YACtF,CAAC;QACH,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -6,19 +6,41 @@ import { z } from '@cyanheads/mcp-ts-core';
6
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
7
  export declare const getSolarActivity: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
8
  include_regions: z.ZodDefault<z.ZodBoolean>;
9
+ flare_hours: z.ZodDefault<z.ZodNumber>;
9
10
  }, z.core.$strip>, z.ZodObject<{
10
11
  latestXray: z.ZodNullable<z.ZodObject<{
11
12
  timeTag: z.ZodString;
12
13
  fluxWm2: z.ZodString;
14
+ fluxWm2Value: z.ZodNumber;
13
15
  flareClass: z.ZodString;
16
+ flareClassFull: z.ZodNullable<z.ZodString>;
14
17
  satellite: z.ZodNumber;
15
18
  }, z.core.$strip>>;
16
19
  recentXray: z.ZodArray<z.ZodObject<{
17
20
  timeTag: z.ZodString;
18
21
  fluxWm2: z.ZodString;
22
+ fluxWm2Value: z.ZodNumber;
19
23
  flareClass: z.ZodString;
24
+ flareClassFull: z.ZodNullable<z.ZodString>;
20
25
  satellite: z.ZodNumber;
21
26
  }, z.core.$strip>>;
27
+ recentFlares: z.ZodArray<z.ZodObject<{
28
+ beginTime: z.ZodString;
29
+ maxTime: z.ZodString;
30
+ endTime: z.ZodNullable<z.ZodString>;
31
+ beginClass: z.ZodString;
32
+ maxClass: z.ZodString;
33
+ endClass: z.ZodNullable<z.ZodString>;
34
+ peakFluxWm2: z.ZodNumber;
35
+ rScale: z.ZodNumber;
36
+ satellite: z.ZodNumber;
37
+ }, z.core.$strip>>;
38
+ f107: z.ZodNullable<z.ZodObject<{
39
+ observedTime: z.ZodString;
40
+ fluxSfu: z.ZodNumber;
41
+ ninetyDayMeanSfu: z.ZodNullable<z.ZodNumber>;
42
+ reportingSchedule: z.ZodString;
43
+ }, z.core.$strip>>;
22
44
  probabilities: z.ZodArray<z.ZodObject<{
23
45
  date: z.ZodString;
24
46
  cClass1Day: z.ZodNumber;
@@ -64,5 +86,7 @@ export declare const getSolarActivity: import("@cyanheads/mcp-ts-core").ToolDefi
64
86
  readonly when: "SWPC feed path returns a permanent 4xx (404, 410, 401, 403). Fails in one attempt.";
65
87
  readonly retryable: false;
66
88
  readonly recovery: "Retrying will not help — the SWPC feed path no longer resolves or no longer has the expected shape; the feed URL needs updating against SWPC current inventory.";
67
- }], undefined>;
89
+ }], {
90
+ readonly notice: z.ZodOptional<z.ZodString>;
91
+ }>;
68
92
  //# sourceMappingURL=get-solar-activity.tool.d.ts.map