@cyanheads/noaa-marine-mcp-server 0.3.2 → 0.4.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 (43) hide show
  1. package/AGENTS.md +3 -3
  2. package/CLAUDE.md +3 -3
  3. package/README.md +11 -7
  4. package/changelog/0.4.x/0.4.0.md +31 -0
  5. package/dist/index.js +1 -12
  6. package/dist/index.js.map +1 -1
  7. package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.d.ts +12 -1
  8. package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.d.ts.map +1 -1
  9. package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.js +40 -13
  10. package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.d.ts +30 -6
  12. package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.js +253 -39
  14. package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/noaa-marine-get-conditions.tool.d.ts +6 -3
  16. package/dist/mcp-server/tools/definitions/noaa-marine-get-conditions.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/noaa-marine-get-conditions.tool.js +53 -16
  18. package/dist/mcp-server/tools/definitions/noaa-marine-get-conditions.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.js +4 -9
  21. package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.d.ts.map +1 -1
  23. package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.js +1 -8
  24. package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.js.map +1 -1
  25. package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.d.ts +2 -2
  26. package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.d.ts.map +1 -1
  27. package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.js +8 -19
  28. package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.js.map +1 -1
  29. package/dist/mcp-server/tools/definitions/noaa-marine-get-tide-predictions.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/noaa-marine-get-tide-predictions.tool.js +1 -6
  31. package/dist/mcp-server/tools/definitions/noaa-marine-get-tide-predictions.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/noaa-marine-get-water-level.tool.d.ts +7 -1
  33. package/dist/mcp-server/tools/definitions/noaa-marine-get-water-level.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/noaa-marine-get-water-level.tool.js +24 -6
  35. package/dist/mcp-server/tools/definitions/noaa-marine-get-water-level.tool.js.map +1 -1
  36. package/dist/services/ndbc/ndbc-service.d.ts +9 -0
  37. package/dist/services/ndbc/ndbc-service.d.ts.map +1 -1
  38. package/dist/services/ndbc/ndbc-service.js +249 -110
  39. package/dist/services/ndbc/ndbc-service.js.map +1 -1
  40. package/dist/services/ndbc/types.d.ts +55 -15
  41. package/dist/services/ndbc/types.d.ts.map +1 -1
  42. package/package.json +3 -3
  43. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-marine-mcp-server
4
- **Version:** 0.3.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.2`
4
+ **Version:** 0.4.0
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-*)
8
- **Zod:** ^4.6.4
8
+ **Zod:** ^4.6.5
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** noaa-marine-mcp-server
4
- **Version:** 0.3.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.2`
4
+ **Version:** 0.4.0
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-*)
8
- **Zod:** ^4.6.4
8
+ **Zod:** ^4.6.5
9
9
 
10
10
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
11
11
 
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.3.2-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-marine-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-marine-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-marine-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.4.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-marine-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-marine-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-marine-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
 
@@ -55,11 +55,13 @@ All resource data is also reachable via tools — use `noaa_marine_find_stations
55
55
 
56
56
  ### `noaa_marine_find_stations` <sub>tool</sub>
57
57
 
58
- - Filter by proximity (`latitude`/`longitude` + `radius_km`, default 100 km, max 1000 km), name/ID substring, US state/territory (CO-OPS only), source (`coops`/`ndbc`/`all`), or `types`: data capabilities (`tide`, `current`, `water_level`, `met`, `current_profile`) or NDBC platform class (`buoy`)
58
+ - Filter by proximity (`latitude`/`longitude` + `radius_km`, default 100 km, max 1000 km), name/ID substring (matched against both sources; an exact ID match sorts first), US state/territory (CO-OPS only), source (`coops`/`ndbc`/`all`), or `types`: data capabilities (`tide`, `current`, `water_level`, `met`, `current_profile`, `water_quality`) or NDBC platform class (`buoy`)
59
59
  - Returns up to `limit` (default 20, max 200) unified stations with source, coordinates, distance, data capabilities, and — for NDBC — physical platform class (buoy, fixed, oilrig, dart, tao, usv, other)
60
60
  - `total_found` and `truncated` report the full match count before the limit is applied
61
+ - Zero matches is a success with `total_found: 0`, carrying a notice derived from the filters that were applied and an echo of the applied search
62
+ - A catalog that fails to load is reported as an unread source alongside the results; when every needed catalog fails, that is a typed `sources_unavailable` error rather than an empty search
61
63
  - Station lists are cached in-memory with a 6-hour TTL — first call after startup may be slightly slower
62
- - Typed `incomplete_coordinates` error when only one of latitude/longitude is supplied; `no_results` when nothing matches
64
+ - Typed `incomplete_coordinates` error when only one of latitude/longitude is supplied
63
65
 
64
66
  ---
65
67
 
@@ -75,7 +77,7 @@ All resource data is also reachable via tools — use `noaa_marine_find_stations
75
77
  ### `noaa_marine_get_water_level` <sub>tool</sub>
76
78
 
77
79
  - 6-minute observed water level with quality flags (`p` preliminary, `v` verified) and optional sensor `sigma`
78
- - Paired 6-minute tide predictions fetched in parallel — failure degrades gracefully, observed levels still return
80
+ - Paired 6-minute tide predictions fetched in parallel — the observed series returns either way, and `predictions_status` says whether an empty prediction series means CO-OPS has none or the fetch failed
79
81
  - `residual_summary` (max surge, max drawdown) only when both series are present
80
82
  - Up to 31 days per request; typed `date_range_exceeded`, `station_not_found`, and `no_data` errors
81
83
 
@@ -94,8 +96,9 @@ All resource data is also reachable via tools — use `noaa_marine_find_stations
94
96
 
95
97
  - Wave height/period/direction, wind speed/gust/direction, sea-surface and air temperature, dew point, barometric pressure
96
98
  - All values SI except `tide_ft` (feet) and `visibility_nmi` (nautical miles), both rarely populated at offshore buoys
97
- - Every sensor field is nullable — `null` when the buoy did not report, never a fabricated value
98
- - Updated roughly every 10 minutes; typed `buoy_not_found` and `no_sensor_data` errors
99
+ - Every sensor field is nullable — `null` when the buoy did not report, never a fabricated value. `latitude`/`longitude` are `null` for a station absent from the NDBC catalog, and `observed_at` is always a valid instant
100
+ - NDBC writes each block of columns on its own cycle, so a block resolves from the most recent row within 90 minutes that carried it: waves report their own `waves_observed_at`, and any other block read from an earlier row is named with its measurement time in the response notice. Row cadence runs 5–60 minutes depending on the station
101
+ - Typed `buoy_not_found` and `no_sensor_data` errors
99
102
 
100
103
  ---
101
104
 
@@ -113,7 +116,7 @@ All resource data is also reachable via tools — use `noaa_marine_find_stations
113
116
  - Water temperature, conductivity, salinity, dissolved oxygen (% and ppm), chlorophyll, turbidity, pH, and redox potential per depth
114
117
  - Water-column counterpart to `noaa_marine_get_conditions` (surface weather and sea state)
115
118
  - Sensor coverage is sparse — most stations report only temperature and salinity; unreported values are `null`, never a fabricated zero
116
- - No capability filter identifies ocean-sensor coverage — call on candidate `source="ndbc"` IDs and expect `observations_not_found` on stations with no `.ocean` file
119
+ - Find candidates with `find_stations` using `source="ndbc"` and `types: ["water_quality"]`, NDBC's own water-quality catalog flag — a strong hint, not a guarantee, so expect `observations_not_found` on a flagged station serving no `.ocean` file
117
120
 
118
121
  ---
119
122
 
@@ -121,6 +124,7 @@ All resource data is also reachable via tools — use `noaa_marine_find_stations
121
124
 
122
125
  - Station record as `application/json` — name, coordinates, source, capabilities, state, and (NDBC) platform class
123
126
  - `station_id` comes from `noaa_marine_find_stations`
127
+ - Typed `station_not_found` when both catalogs were read and neither carries the ID, and `source_unavailable` when a catalog could not be read — a station only the unread catalog carries is never reported as nonexistent
124
128
  - Cached with a 6-hour TTL (`cacheHint`)
125
129
 
126
130
  ## Features
@@ -0,0 +1,31 @@
1
+ ---
2
+ summary: "NDBC parser fixes, structured empty searches, water_quality station type"
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.4.0 — 2026-09-17
8
+
9
+ ## Added
10
+
11
+ - **`water_quality`** joins `noaa_marine_find_stations`' `types` filter, matching NDBC sub-surface water-column stations — 140 stations, 45 previously unreachable by any filter (#28)
12
+ - **`noaa_marine_find_stations`** matches CO-OPS rows by station ID, not just NDBC; an exact-ID match sorts first when no proximity center is given (#29)
13
+ - **`noaa_marine_find_stations`** returns a zero-match search as a success (`total_found: 0`) with a `notice` and an `applied_search` echo of the filters that emptied it, and adds a `sources` block naming any catalog that failed to answer (#31, #21)
14
+ - **`noaa_marine_get_conditions`** adds `waves_observed_at` and a staleness `notice` — NDBC writes each sensor block on its own cycle, so a block up to 90 minutes older than `observed_at` is now disclosed instead of silently blended in (#24)
15
+ - **`noaa_marine_get_water_level`** adds `predictions_status` and a notice disclosing rejected upstream prediction legs instead of dropping them silently (#21)
16
+ - **`noaa-marine-station` resource** returns a typed `errors[]` contract (`station_not_found`, `source_unavailable`) in place of an untyped failure (#21)
17
+
18
+ ## Changed
19
+
20
+ - **`noaa_marine_get_conditions`** `latitude`/`longitude` are nullable — a station absent from the NDBC catalog now reports unknown coordinates instead of a fabricated `0, 0` (#17)
21
+
22
+ ## Fixed
23
+
24
+ - **`noaa_marine_get_conditions`** wave fields no longer read `null` when the newest NDBC row is `MM`: each sensor block resolves from the most recent row inside a 90-minute look-back that actually carried it (#24)
25
+ - **NDBC parser** decodes XML entities in station names and owners (12 stations affected) and validates timestamps per row — a malformed row is skipped rather than producing a fabricated or unparseable observation time (#20)
26
+ - **`noaa_marine_find_stations`** no longer throws `no_results`; a zero-row multi-catalog fan-out raises `sources_unavailable` only when every catalog failed (#31, #21)
27
+
28
+ ## Dependencies
29
+
30
+ - `@cyanheads/mcp-ts-core` ^0.13.2 → ^0.13.3
31
+ - `zod` ^4.6.4 → ^4.6.5
package/dist/index.js CHANGED
@@ -35,18 +35,7 @@ await createApp({
35
35
  'resources/list': { ttlMs: 86_400_000, cacheScope: 'public' },
36
36
  'resources/templates/list': { ttlMs: 86_400_000, cacheScope: 'public' },
37
37
  },
38
- instructions: 'US marine conditions via NOAA CO-OPS and NDBC. ' +
39
- 'Start with noaa_marine_find_stations to resolve a location or name to station IDs, ' +
40
- 'then call the appropriate data tool. ' +
41
- 'CO-OPS provides tide predictions (noaa_marine_get_tide_predictions), ' +
42
- 'observed water levels and storm surge (noaa_marine_get_water_level), ' +
43
- 'and tidal-current predictions (noaa_marine_get_currents). ' +
44
- 'NDBC provides live buoy conditions — waves, wind, sea-surface temp (noaa_marine_get_conditions), ' +
45
- 'observed ocean-current depth profiles (noaa_marine_get_current_profile), ' +
46
- 'and sub-surface water-column observations — temperature, salinity, dissolved oxygen and more (noaa_marine_get_ocean_observations). ' +
47
- 'The two current tools are distinct: get_currents is CO-OPS tidal-current predictions (forecast), ' +
48
- 'get_current_profile is NDBC observed depth-binned currents from an ADCP buoy. ' +
49
- 'All water height data is referenced to MLLW by default (US nautical chart datum).',
38
+ instructions: `US marine conditions from NOAA CO-OPS and NDBC: CO-OPS is coastal-gauge tide and tidal-current predictions plus observed water levels, NDBC is live buoy observation, and every water height is referenced to MLLW, the US nautical chart datum, unless another datum is requested. Start with noaa_marine_find_stations to resolve a place name, a coordinate pair, or a bare station number to a station ID — its types filter names what each station can serve, and an ID from one source never works on a tool that reads the other. That source split is also what separates the two current tools: noaa_marine_get_currents returns CO-OPS tidal-current predictions, noaa_marine_get_current_profile an observed NDBC ADCP measurement.`,
50
39
  setup(core) {
51
40
  const serverConfig = getServerConfig();
52
41
  initCoopsService(core.config, core.storage, serverConfig);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oEAAoE,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,MAAM,kEAAkE,CAAC;AAC1G,OAAO,EAAE,uBAAuB,EAAE,MAAM,mEAAmE,CAAC;AAC5G,OAAO,EAAE,2BAA2B,EAAE,MAAM,wEAAwE,CAAC;AACrH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iEAAiE,CAAC;AACxG,OAAO,EAAE,8B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,CAAC,IAAI;QACR,MAAM,YAAY,GAAG,eAAe,EAAE,CAAC;QACvC,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAC1D,eAAe,EAAE,CAAC;IACpB,CAAC;CACF,CAAC,CAAC"}
@@ -3,7 +3,18 @@
3
3
  * @module mcp-server/resources/definitions/noaa-marine-station.resource
4
4
  */
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
6
7
  export declare const noaaMarineStationResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
7
8
  station_id: z.ZodString;
8
- }, z.core.$strip>, undefined, undefined>;
9
+ }, z.core.$strip>, undefined, readonly [{
10
+ readonly reason: "station_not_found";
11
+ readonly code: JsonRpcErrorCode.NotFound;
12
+ readonly when: "Both catalogs were read and neither carries this station ID.";
13
+ readonly recovery: "Use noaa_marine_find_stations to look the ID up — query matches station names and IDs on both sources.";
14
+ }, {
15
+ readonly reason: "source_unavailable";
16
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
17
+ readonly when: "A station catalog could not be read, and no catalog that was read carries this ID.";
18
+ readonly recovery: "Retry in a few moments — the station catalogs are cached for six hours once a fetch succeeds.";
19
+ }]>;
9
20
  //# sourceMappingURL=noaa-marine-station.resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noaa-marine-station.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/noaa-marine-station.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAKrD,eAAO,MAAM,yBAAyB;;wCAqGpC,CAAC"}
1
+ {"version":3,"file":"noaa-marine-station.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/noaa-marine-station.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;GAyIpC,CAAC"}
@@ -3,18 +3,12 @@
3
3
  * @module mcp-server/resources/definitions/noaa-marine-station.resource
4
4
  */
5
5
  import { resource, z } from '@cyanheads/mcp-ts-core';
6
- import { notFound } from '@cyanheads/mcp-ts-core/errors';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { getCoopsService } from '../../../services/coops/coops-service.js';
8
8
  import { getNdbcService } from '../../../services/ndbc/ndbc-service.js';
9
9
  export const noaaMarineStationResource = resource('noaa-marine://station/{station_id}', {
10
10
  name: 'noaa_marine_station',
11
- description: 'Metadata for a CO-OPS or NDBC station by ID: name, coordinates, source, data capabilities, and — for NDBC — ' +
12
- 'the physical platform class. `type` is the primary data capability (same meaning as in noaa_marine_find_stations), ' +
13
- 'omitted when the station reports no data capability; `platform` is the NDBC platform class ' +
14
- '(buoy, fixed, oilrig, dart, tao, usv, other) and is a separate axis, absent for CO-OPS. ' +
15
- 'CO-OPS station IDs are numeric (tide/water-level) or alphanumeric (current stations). ' +
16
- 'NDBC station IDs are 5-character alphanumeric codes. ' +
17
- 'Use noaa_marine_find_stations to discover station IDs.',
11
+ description: `Metadata for a CO-OPS or NDBC station by ID: name, coordinates, source, data capabilities, and — for NDBC — the physical platform class. The type field is the primary data capability, meaning the same thing here as in noaa_marine_find_stations, and is omitted when the station reports no data capability; platform is the NDBC platform class (buoy, fixed, oilrig, dart, tao, usv, other), a separate axis that CO-OPS stations do not carry. CO-OPS station IDs are numeric for tide and water-level stations and alphanumeric for current stations, while NDBC station IDs are 5-character alphanumeric codes — use noaa_marine_find_stations to discover them. A station ID that neither catalog carries is a station_not_found error, distinct from source_unavailable, which says a catalog could not be read and so was never searched.`,
18
12
  mimeType: 'application/json',
19
13
  cacheHint: { ttlMs: 21_600_000, cacheScope: 'public' },
20
14
  params: z.object({
@@ -23,6 +17,20 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
23
17
  .regex(/^[A-Za-z0-9_-]{1,20}$/)
24
18
  .describe('Station identifier. CO-OPS: numeric (e.g. 9447130) or alphanumeric (e.g. ACT4176). NDBC: e.g. 46041.'),
25
19
  }),
20
+ errors: [
21
+ {
22
+ reason: 'station_not_found',
23
+ code: JsonRpcErrorCode.NotFound,
24
+ when: 'Both catalogs were read and neither carries this station ID.',
25
+ recovery: 'Use noaa_marine_find_stations to look the ID up — query matches station names and IDs on both sources.',
26
+ },
27
+ {
28
+ reason: 'source_unavailable',
29
+ code: JsonRpcErrorCode.ServiceUnavailable,
30
+ when: 'A station catalog could not be read, and no catalog that was read carries this ID.',
31
+ recovery: 'Retry in a few moments — the station catalogs are cached for six hours once a fetch succeeds.',
32
+ },
33
+ ],
26
34
  async handler(params, ctx) {
27
35
  const coopsSvc = getCoopsService();
28
36
  const ndbcSvc = getNdbcService();
@@ -73,13 +81,17 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
73
81
  if (ndbcResult.status === 'fulfilled') {
74
82
  const match = ndbcResult.value.find((s) => s.id.toUpperCase() === id);
75
83
  if (match) {
76
- // Data capabilities from the catalog flags only — no fabricated "buoy" when both are off (#13).
77
- // `current_profile` (NDBC observed ocean currents) is named apart from CO-OPS `current`.
84
+ // Data capabilities from the catalog flags only — no fabricated "buoy" when all are off (#13).
85
+ // `current_profile` (NDBC observed ocean currents) is named apart from CO-OPS `current`;
86
+ // `water_quality` is the sub-surface water-column flag. Same derivation as find_stations,
87
+ // so `type` means the same thing on both surfaces (#14).
78
88
  const caps = [];
79
89
  if (match.hasMet)
80
90
  caps.push('met');
81
91
  if (match.hasCurrents)
82
92
  caps.push('current_profile');
93
+ if (match.hasWaterQuality)
94
+ caps.push('water_quality');
83
95
  const result = {
84
96
  station_id: match.id,
85
97
  name: match.name,
@@ -99,9 +111,24 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
99
111
  return result;
100
112
  }
101
113
  }
102
- throw notFound(`Station ${params.station_id} not found in CO-OPS or NDBC. Use noaa_marine_find_stations to discover valid IDs.`, {
103
- station_id: params.station_id,
104
- });
114
+ // No catalog that answered carries the ID. Whether that means "this station does not exist"
115
+ // depends on whether every catalog was actually read — a rejected leg was never searched, so
116
+ // reporting NotFound for it would assert something the handler never checked.
117
+ const unread = [];
118
+ const answered = [];
119
+ (coopsResult.status === 'rejected' ? unread : answered).push('coops');
120
+ (ndbcResult.status === 'rejected' ? unread : answered).push('ndbc');
121
+ if (unread.length > 0) {
122
+ const searched = answered.length > 0
123
+ ? `it is not in the ${answered.join(' or ')} catalog`
124
+ : 'no catalog could be searched';
125
+ throw ctx.fail('source_unavailable', `Station ${params.station_id} could not be resolved: the ${unread.join(' and ')} ${unread.length > 1 ? 'catalogs' : 'catalog'} could not be read, and ${searched}.`, {
126
+ ...ctx.recoveryFor('source_unavailable'),
127
+ station_id: params.station_id,
128
+ unread_sources: unread,
129
+ });
130
+ }
131
+ throw ctx.fail('station_not_found', `Station ${params.station_id} not found in CO-OPS or NDBC. Use noaa_marine_find_stations to discover valid IDs.`, { ...ctx.recoveryFor('station_not_found'), station_id: params.station_id });
105
132
  },
106
133
  });
107
134
  //# sourceMappingURL=noaa-marine-station.resource.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"noaa-marine-station.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/noaa-marine-station.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAQ,CAAC,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QACH,CAAC;QAED,MAAM,QAAQ,CACZ,WAAW,MAAM,CAAC,UAAU,oFAAoF,EAChH;YACE,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"noaa-marine-station.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/noaa-marine-station.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,MAAM,CAAC,MAAM,yBAAyB,GAAG,QAAQ,CAAC,oCAAoC,EAAE;IACtF,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,uzBAAuzB;IACp0B,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE;IACtD,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,KAAK,CAAC,uBAAuB,CAAC;aAC9B,QAAQ,CACP,sGAAsG,CACvG;KACJ,CAAC;IAEF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,mBAAmB;YAC3B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,8DAA8D;YACpE,QAAQ,EACN,wGAAwG;SAC3G;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,oFAAoF;YAC1F,QAAQ,EACN,+FAA+F;SAClG;KACF;IAED,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,MAAM,QAAQ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AAI,CAAC,MAAM,CAAC,CAAC;QAEpE,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,QAAQ,GACZ,QAAQ,CAAC,MAAM,GAAG,CAAC;gBACjB,CAAC,CAAC,oBAAoB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU;gBACrD,CAAC,CAAC,8BAA8B,CAAC;YACrC,MAAM,GAAG,CAAC,IAAI,CACZ,oBAAoB,EACpB,WAAW,MAAM,CAAC,UAAU,+BAA+B,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,2BAA2B,QAAQ,GAAG,EACnK;gBACE,GAAG,GAAG,CAAC,WAAW,CAAC,oBAAoB,CAAC;gBACxC,UAAU,EAAE,MAAM,CAAC,UAAU;gBAC7B,cAAc,EAAE,MAAM;aACvB,CACF,CAAC;QACJ,CAAC;QAED,MAAM,GAAG,CAAC,IAAI,CACZ,mBAAmB,EACnB,WAAW,MAAM,CAAC,UAAU,oFAAoF,EAChH,EAAE,GAAG,GAAG,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAC3E,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -79,6 +79,7 @@ export declare const noaaMarineFindStations: import("@cyanheads/mcp-ts-core").To
79
79
  met: "met";
80
80
  tide: "tide";
81
81
  water_level: "water_level";
82
+ water_quality: "water_quality";
82
83
  }>>>;
83
84
  limit: z.ZodDefault<z.ZodNumber>;
84
85
  }, z.core.$strip>, z.ZodObject<{
@@ -100,14 +101,37 @@ export declare const noaaMarineFindStations: import("@cyanheads/mcp-ts-core").To
100
101
  total_found: z.ZodNumber;
101
102
  truncated: z.ZodOptional<z.ZodBoolean>;
102
103
  }, z.core.$strip>, readonly [{
103
- readonly reason: "no_results";
104
- readonly code: JsonRpcErrorCode.NotFound;
105
- readonly when: "No stations match the query, location, or filters.";
106
- readonly recovery: "Widen the search by increasing radius_km, removing type filters, or using a broader query.";
107
- }, {
108
104
  readonly reason: "incomplete_coordinates";
109
105
  readonly code: JsonRpcErrorCode.InvalidParams;
110
106
  readonly when: "Only one of latitude/longitude was supplied — proximity search needs the pair.";
111
107
  readonly recovery: "Supply both latitude and longitude to search by proximity, or drop both and search by query or state instead.";
112
- }], undefined>;
108
+ }, {
109
+ readonly reason: "sources_unavailable";
110
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
111
+ readonly when: "Every station catalog this search needed failed to load, so no station list could be searched.";
112
+ readonly recovery: "Retry the search in a few moments — a catalog is cached for six hours once a fetch succeeds.";
113
+ }], {
114
+ readonly applied_search: z.ZodOptional<z.ZodObject<{
115
+ catalogs_read: z.ZodArray<z.ZodString>;
116
+ center: z.ZodOptional<z.ZodObject<{
117
+ latitude: z.ZodNumber;
118
+ longitude: z.ZodNumber;
119
+ }, z.core.$strip>>;
120
+ query: z.ZodOptional<z.ZodString>;
121
+ radius_km: z.ZodOptional<z.ZodNumber>;
122
+ source: z.ZodString;
123
+ state: z.ZodOptional<z.ZodString>;
124
+ types: z.ZodOptional<z.ZodArray<z.ZodString>>;
125
+ types_by_source: z.ZodOptional<z.ZodObject<{
126
+ coops: z.ZodArray<z.ZodString>;
127
+ ndbc: z.ZodArray<z.ZodString>;
128
+ }, z.core.$strip>>;
129
+ }, z.core.$strip>>;
130
+ readonly notice: z.ZodOptional<z.ZodString>;
131
+ readonly sources: z.ZodOptional<z.ZodObject<{
132
+ answered: z.ZodArray<z.ZodString>;
133
+ attempted: z.ZodArray<z.ZodString>;
134
+ failed: z.ZodArray<z.ZodString>;
135
+ }, z.core.$strip>>;
136
+ }>;
113
137
  //# sourceMappingURL=noaa-marine-find-stations.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noaa-marine-find-stations.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/noaa-marine-find-stations.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA0EjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0YjC,CAAC"}
1
+ {"version":3,"file":"noaa-marine-find-stations.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/noaa-marine-find-stations.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA8MjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkgBjC,CAAC"}