@cyanheads/noaa-marine-mcp-server 0.1.7 → 0.3.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.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +29 -7
- package/changelog/0.2.x/0.2.0.md +22 -0
- package/changelog/0.3.x/0.3.0.md +15 -0
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.js +19 -9
- package/dist/mcp-server/resources/definitions/noaa-marine-station.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.d.ts +3 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.js +67 -32
- package/dist/mcp-server/tools/definitions/noaa-marine-find-stations.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.d.ts +33 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.js +131 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-currents.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.d.ts +40 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.js +170 -0
- package/dist/mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.js.map +1 -0
- package/dist/services/ndbc/ndbc-service.d.ts +26 -1
- package/dist/services/ndbc/ndbc-service.d.ts.map +1 -1
- package/dist/services/ndbc/ndbc-service.js +181 -0
- package/dist/services/ndbc/ndbc-service.js.map +1 -1
- package/dist/services/ndbc/types.d.ts +63 -0
- package/dist/services/ndbc/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** noaa-marine-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.3.0
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** noaa-marine-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.3.0
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.14`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>@cyanheads/noaa-marine-mcp-server</h1>
|
|
3
3
|
<p><b>Find NOAA tide stations and NDBC buoys, fetch tide predictions, water levels, tidal currents, and live buoy conditions via MCP. STDIO or Streamable HTTP.</b>
|
|
4
|
-
<div>
|
|
4
|
+
<div>7 Tools • 1 Resource</div>
|
|
5
5
|
</p>
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/noaa-marine-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/noaa-marine-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
## Tools
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Seven tools covering the full US marine operational workflow — station discovery, tide predictions, observed water levels, tidal current predictions and profiles, and live offshore buoy conditions:
|
|
33
33
|
|
|
34
34
|
| Tool | Description |
|
|
35
35
|
|:-----|:------------|
|
|
@@ -38,13 +38,15 @@ Five tools covering the full US marine operational workflow — station discover
|
|
|
38
38
|
| `noaa_marine_get_water_level` | Observed water level (real-time or historical) for a CO-OPS station, paired with predictions to compute storm surge or anomalous drawdown. |
|
|
39
39
|
| `noaa_marine_get_currents` | Tidal current predictions for a CO-OPS current station: max flood/ebb speeds, slack times, and directions. Defaults to MAX_SLACK (practical passage-planning view). |
|
|
40
40
|
| `noaa_marine_get_conditions` | Live marine conditions from an NDBC buoy: wave height/period/direction, wind, sea-surface temp, air temp, and barometric pressure. |
|
|
41
|
+
| `noaa_marine_get_current_profile` | Observed ocean-current depth profile from an NDBC ADCP buoy: speed and direction at each depth bin. Distinct from `noaa_marine_get_currents`, which is a CO-OPS tidal-current forecast. |
|
|
42
|
+
| `noaa_marine_get_ocean_observations` | Sub-surface water-column observations from an NDBC station: water temperature, salinity, dissolved oxygen, chlorophyll, turbidity, and pH at each reported depth. The water-column counterpart to `noaa_marine_get_conditions` (surface weather and sea state). |
|
|
41
43
|
|
|
42
44
|
### `noaa_marine_find_stations`
|
|
43
45
|
|
|
44
46
|
Unified station discovery across CO-OPS (3,450+ tide/water-level stations, 4,430+ current stations) and NDBC (1,354+ active buoys worldwide).
|
|
45
47
|
|
|
46
|
-
- Filter by proximity (latitude/longitude + radius), name substring, state/territory, source (CO-OPS vs NDBC), or
|
|
47
|
-
- Returns unified station list with source,
|
|
48
|
+
- Filter by proximity (latitude/longitude + radius), name substring, state/territory, source (CO-OPS vs NDBC), or `types`: data capabilities (tide, current, water_level, met, current_profile) or NDBC platform class (buoy)
|
|
49
|
+
- Returns a unified station list with source, coordinates, distance, data capabilities, and — for NDBC — the physical platform class (buoy, fixed, oilrig, dart, tao, usv, other)
|
|
48
50
|
- Station lists are cached in-memory (6-hour TTL) — first call after startup may be slightly slower
|
|
49
51
|
- Required first step: CO-OPS and NDBC use non-overlapping ID systems; guessing a station ID reliably fails
|
|
50
52
|
|
|
@@ -94,11 +96,31 @@ Live NDBC buoy observations (most recent ~45 days, updated every 10 minutes).
|
|
|
94
96
|
- All sensor fields nullable (`null` when buoy sensor did not report — normal for offshore buoys)
|
|
95
97
|
- All values in SI units except `TIDE` (feet) and `VIS` (nautical miles), which are rarely populated at offshore buoys
|
|
96
98
|
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
### `noaa_marine_get_current_profile`
|
|
102
|
+
|
|
103
|
+
Observed ocean-current depth profile from an NDBC ADCP buoy — the most recent measurement at each depth bin.
|
|
104
|
+
|
|
105
|
+
- Depth (m), direction (degrees true, the direction the current flows toward), and speed (cm/s) per bin
|
|
106
|
+
- Distinct from `noaa_marine_get_currents`: this is an NDBC *observed* acoustic-Doppler measurement, not a CO-OPS tidal-current *prediction*
|
|
107
|
+
- Most NDBC stations serve no ADCP profile — use `find_stations` with `source="ndbc"` and `types: ["current_profile"]` to discover the ones that do
|
|
108
|
+
- Direction or speed is `null` for a bin when NDBC did not report that component
|
|
109
|
+
|
|
110
|
+
### `noaa_marine_get_ocean_observations`
|
|
111
|
+
|
|
112
|
+
Sub-surface water-column observations from an NDBC station — the most recent reading at each reported depth.
|
|
113
|
+
|
|
114
|
+
- Water temperature (°C), conductivity (mS/cm), salinity (psu), dissolved oxygen (% saturation and ppm), chlorophyll (µg/l), turbidity (FTU), pH, and redox potential (mV) per depth
|
|
115
|
+
- The water-column counterpart to `noaa_marine_get_conditions`: this reports what the water is doing below the surface, that one reports surface weather and sea state
|
|
116
|
+
- Sensor coverage is sparse — most stations report only temperature and salinity; any value the station did not report comes back `null`, never a fabricated zero
|
|
117
|
+
- Sub-surface sensors are on only a subset of NDBC stations and carry no station-catalog flag, so there is no capability filter — call it on candidate `source="ndbc"` station IDs and expect the `observations_not_found` error on the many stations that serve no ocean file
|
|
118
|
+
|
|
97
119
|
## Resources and prompts
|
|
98
120
|
|
|
99
121
|
| Type | Name | Description |
|
|
100
122
|
|:-----|:-----|:------------|
|
|
101
|
-
| Resource | `noaa-marine://station/{station_id}` | Metadata for a CO-OPS or NDBC station by ID: name, coordinates, source, capabilities, and
|
|
123
|
+
| Resource | `noaa-marine://station/{station_id}` | Metadata for a CO-OPS or NDBC station by ID: name, coordinates, source, data capabilities, state, and — for NDBC — physical platform class. |
|
|
102
124
|
|
|
103
125
|
All resource data is also reachable via tools. Use `noaa_marine_find_stations` to discover station IDs before accessing the resource.
|
|
104
126
|
|
|
@@ -125,7 +147,7 @@ Agent-friendly output:
|
|
|
125
147
|
- Datum echoed on every tide/water-level response — agents can state units and reference correctly without assumptions
|
|
126
148
|
- `total_found` on `find_stations` shows count before `limit` slice so agents know whether to re-query
|
|
127
149
|
- All NDBC sensor fields explicitly nullable with per-field unit documentation — agents don't fabricate missing readings
|
|
128
|
-
- Typed station source (`coops` | `ndbc`)
|
|
150
|
+
- Typed station source (`coops` | `ndbc`) on every station record, plus a data-capability `type` and (NDBC only) a `platform` class where applicable — agents can branch on data, not string parsing
|
|
129
151
|
|
|
130
152
|
## Getting started
|
|
131
153
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adds noaa_marine_get_current_profile (NDBC observed currents) and a current_profile filter; type is now purely the data-capability axis with platform as a separate field, and the fabricated buoy capability is removed — breaking output changes"
|
|
3
|
+
breaking: true
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.2.0 — 2026-07-16
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`noaa_marine_get_current_profile`** — new tool reading an NDBC station's `.adcp` realtime feed for the latest observed ocean-current profile: depth (m), direction (degrees true), and speed (cm/s) per depth bin. Distinct from `noaa_marine_get_currents`, which returns CO-OPS tidal-current *predictions*, not observed data. ([#15](https://github.com/cyanheads/noaa-marine-mcp-server/issues/15))
|
|
12
|
+
- **`current_profile`** — new `types` filter value on `noaa_marine_find_stations`, reaching NDBC stations with observed-current data; previously no filter value matched them. ([#15](https://github.com/cyanheads/noaa-marine-mcp-server/issues/15))
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **`platform`** — new field on `noaa_marine_find_stations` NDBC rows and the station resource: the NDBC physical platform class (`buoy`, `fixed`, `oilrig`, `dart`, `tao`, `usv`, `other`). Absent for CO-OPS, which has no platform taxonomy. ([#14](https://github.com/cyanheads/noaa-marine-mcp-server/issues/14))
|
|
17
|
+
- **`type`** — now exclusively the data-capability axis (`tide`, `current`, `water_level`, `met`, `current_profile`), consistent between `find_stations` and the station resource, and optional — omitted when a station has no data capability. The resource previously emitted CO-OPS's undocumented station reference code (R/T/S) here instead. ([#14](https://github.com/cyanheads/noaa-marine-mcp-server/issues/14))
|
|
18
|
+
- **NDBC observed-currents capability** — renamed `currents` → `current_profile` in `capabilities`, `type`, and the `types` filter, removing its one-letter collision with CO-OPS's `current` (tidal-current predictions). ([#15](https://github.com/cyanheads/noaa-marine-mcp-server/issues/15))
|
|
19
|
+
|
|
20
|
+
## Fixed
|
|
21
|
+
|
|
22
|
+
- **Fabricated `buoy` capability** — `noaa_marine_find_stations` and the station resource no longer report `capabilities: ["buoy"]` / `type: "buoy"` for an NDBC station with no reported met or current data; such a station now reports an empty `capabilities` array, and the `types` filter's `buoy` value matches a station's real platform class instead of falling back to any station with no other capability. ([#13](https://github.com/cyanheads/noaa-marine-mcp-server/issues/13))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adds noaa_marine_get_ocean_observations — NDBC .ocean sub-surface water-column data (temperature, salinity, dissolved oxygen, chlorophyll, turbidity, pH at depth)"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.3.0 — 2026-07-16
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`noaa_marine_get_ocean_observations`** — new tool reading an NDBC station's `.ocean` realtime feed for the latest sub-surface water-column observation: at each reported depth, water temperature (°C), conductivity (mS/cm), salinity (psu), dissolved oxygen (% saturation and ppm), chlorophyll (µg/l), turbidity (FTU), pH, and redox potential (mV). A station reporting several depths at one timestamp returns one reading per depth. The water-column counterpart to `noaa_marine_get_conditions`, which returns surface meteorology and sea state. Ocean-sensor coverage carries no station-catalog flag, so it is a best-effort call on NDBC station IDs — a typed `observations_not_found` error is returned where no `.ocean` file exists, and `latitude`/`longitude` are `null` when the station is absent from the active-stations list. ([#16](https://github.com/cyanheads/noaa-marine-mcp-server/issues/16))
|
|
12
|
+
|
|
13
|
+
## Changed
|
|
14
|
+
|
|
15
|
+
- **`tsc-alias`** `^1.8.17 → ^1.9.1` (dev dependency) — keeps the devcheck Outdated gate green after the pinned version aged past the release-age hold.
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,9 @@ import { getServerConfig } from './config/server-config.js';
|
|
|
8
8
|
import { noaaMarineStationResource } from './mcp-server/resources/definitions/noaa-marine-station.resource.js';
|
|
9
9
|
import { noaaMarineFindStations } from './mcp-server/tools/definitions/noaa-marine-find-stations.tool.js';
|
|
10
10
|
import { noaaMarineGetConditions } from './mcp-server/tools/definitions/noaa-marine-get-conditions.tool.js';
|
|
11
|
+
import { noaaMarineGetCurrentProfile } from './mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.js';
|
|
11
12
|
import { noaaMarineGetCurrents } from './mcp-server/tools/definitions/noaa-marine-get-currents.tool.js';
|
|
13
|
+
import { noaaMarineGetOceanObservations } from './mcp-server/tools/definitions/noaa-marine-get-ocean-observations.tool.js';
|
|
12
14
|
import { noaaMarineGetTidePredictions } from './mcp-server/tools/definitions/noaa-marine-get-tide-predictions.tool.js';
|
|
13
15
|
import { noaaMarineGetWaterLevel } from './mcp-server/tools/definitions/noaa-marine-get-water-level.tool.js';
|
|
14
16
|
import { initCoopsService } from './services/coops/coops-service.js';
|
|
@@ -22,6 +24,8 @@ await createApp({
|
|
|
22
24
|
noaaMarineGetWaterLevel,
|
|
23
25
|
noaaMarineGetCurrents,
|
|
24
26
|
noaaMarineGetConditions,
|
|
27
|
+
noaaMarineGetCurrentProfile,
|
|
28
|
+
noaaMarineGetOceanObservations,
|
|
25
29
|
],
|
|
26
30
|
resources: [noaaMarineStationResource],
|
|
27
31
|
prompts: [],
|
|
@@ -30,8 +34,12 @@ await createApp({
|
|
|
30
34
|
'then call the appropriate data tool. ' +
|
|
31
35
|
'CO-OPS provides tide predictions (noaa_marine_get_tide_predictions), ' +
|
|
32
36
|
'observed water levels and storm surge (noaa_marine_get_water_level), ' +
|
|
33
|
-
'and tidal
|
|
34
|
-
'NDBC provides live buoy conditions — waves, wind, sea-surface temp (noaa_marine_get_conditions)
|
|
37
|
+
'and tidal-current predictions (noaa_marine_get_currents). ' +
|
|
38
|
+
'NDBC provides live buoy conditions — waves, wind, sea-surface temp (noaa_marine_get_conditions), ' +
|
|
39
|
+
'observed ocean-current depth profiles (noaa_marine_get_current_profile), ' +
|
|
40
|
+
'and sub-surface water-column observations — temperature, salinity, dissolved oxygen and more (noaa_marine_get_ocean_observations). ' +
|
|
41
|
+
'The two current tools are distinct: get_currents is CO-OPS tidal-current predictions (forecast), ' +
|
|
42
|
+
'get_current_profile is NDBC observed depth-binned currents from an ADCP buoy. ' +
|
|
35
43
|
'All water height data is referenced to MLLW by default (US nautical chart datum).',
|
|
36
44
|
setup(core) {
|
|
37
45
|
const serverConfig = getServerConfig();
|
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,qBAAqB,EAAE,MAAM,iEAAiE,CAAC;AACxG,OAAO,EAAE,4BAA4B,EAAE,MAAM,yEAAyE,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE;QACL,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;QACvB,qBAAqB;QACrB,uBAAuB;
|
|
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,8BAA8B,EAAE,MAAM,2EAA2E,CAAC;AAC3H,OAAO,EAAE,4BAA4B,EAAE,MAAM,yEAAyE,CAAC;AACvH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oEAAoE,CAAC;AAC7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,wBAAwB;IAC9B,KAAK,EAAE,wBAAwB;IAC/B,KAAK,EAAE;QACL,sBAAsB;QACtB,4BAA4B;QAC5B,uBAAuB;QACvB,qBAAqB;QACrB,uBAAuB;QACvB,2BAA2B;QAC3B,8BAA8B;KAC/B;IACD,SAAS,EAAE,CAAC,yBAAyB,CAAC;IACtC,OAAO,EAAE,EAAE;IACX,YAAY,EACV,iDAAiD;QACjD,qFAAqF;QACrF,uCAAuC;QACvC,uEAAuE;QACvE,uEAAuE;QACvE,4DAA4D;QAC5D,mGAAmG;QACnG,2EAA2E;QAC3E,qIAAqI;QACrI,mGAAmG;QACnG,gFAAgF;QAChF,mFAAmF;IAErF,KAAK,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"}
|
|
@@ -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;;
|
|
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;;wCAoGpC,CAAC"}
|
|
@@ -8,7 +8,10 @@ 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, capabilities, and
|
|
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. ' +
|
|
12
15
|
'CO-OPS station IDs are numeric (tide/water-level) or alphanumeric (current stations). ' +
|
|
13
16
|
'NDBC station IDs are 5-character alphanumeric codes. ' +
|
|
14
17
|
'Use noaa_marine_find_stations to discover station IDs.',
|
|
@@ -39,6 +42,7 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
|
|
|
39
42
|
current.find((s) => s.id.toUpperCase() === id) ??
|
|
40
43
|
waterLevel.find((s) => s.id.toUpperCase() === id);
|
|
41
44
|
if (match) {
|
|
45
|
+
// A CO-OPS match came from one of the three lists, so at least one capability is present.
|
|
42
46
|
const caps = [];
|
|
43
47
|
if (tide.some((s) => s.id.toUpperCase() === id))
|
|
44
48
|
caps.push('tide');
|
|
@@ -46,8 +50,6 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
|
|
|
46
50
|
caps.push('current');
|
|
47
51
|
if (waterLevel.some((s) => s.id.toUpperCase() === id))
|
|
48
52
|
caps.push('water_level');
|
|
49
|
-
if (caps.length === 0)
|
|
50
|
-
caps.push('tide');
|
|
51
53
|
const result = {
|
|
52
54
|
station_id: match.id,
|
|
53
55
|
name: match.name,
|
|
@@ -56,10 +58,13 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
|
|
|
56
58
|
longitude: match.lng,
|
|
57
59
|
capabilities: caps,
|
|
58
60
|
};
|
|
61
|
+
// `type` is the primary data capability — the same axis find_stations reports. The CO-OPS
|
|
62
|
+
// catalog `type` code (R/T/S reference classes) is a different, undocumented axis and is not
|
|
63
|
+
// surfaced here; CO-OPS has no platform class.
|
|
64
|
+
if (caps[0])
|
|
65
|
+
result.type = caps[0];
|
|
59
66
|
if (match.state)
|
|
60
67
|
result.state = match.state;
|
|
61
|
-
if (match.type)
|
|
62
|
-
result.type = match.type;
|
|
63
68
|
return result;
|
|
64
69
|
}
|
|
65
70
|
}
|
|
@@ -67,22 +72,27 @@ export const noaaMarineStationResource = resource('noaa-marine://station/{statio
|
|
|
67
72
|
if (ndbcResult.status === 'fulfilled') {
|
|
68
73
|
const match = ndbcResult.value.find((s) => s.id.toUpperCase() === id);
|
|
69
74
|
if (match) {
|
|
75
|
+
// Data capabilities from the catalog flags only — no fabricated "buoy" when both are off (#13).
|
|
76
|
+
// `current_profile` (NDBC observed ocean currents) is named apart from CO-OPS `current`.
|
|
70
77
|
const caps = [];
|
|
71
78
|
if (match.hasMet)
|
|
72
79
|
caps.push('met');
|
|
73
80
|
if (match.hasCurrents)
|
|
74
|
-
caps.push('
|
|
75
|
-
if (caps.length === 0)
|
|
76
|
-
caps.push('buoy');
|
|
81
|
+
caps.push('current_profile');
|
|
77
82
|
const result = {
|
|
78
83
|
station_id: match.id,
|
|
79
84
|
name: match.name,
|
|
80
85
|
source: 'ndbc',
|
|
81
86
|
latitude: match.lat,
|
|
82
87
|
longitude: match.lon,
|
|
83
|
-
type: match.type ?? 'buoy',
|
|
84
88
|
capabilities: caps,
|
|
85
89
|
};
|
|
90
|
+
// `type` is the primary data capability (same axis as find_stations), omitted when the
|
|
91
|
+
// station serves no data. `platform` is the NDBC physical class — a separate axis (#14).
|
|
92
|
+
if (caps[0])
|
|
93
|
+
result.type = caps[0];
|
|
94
|
+
if (match.type)
|
|
95
|
+
result.platform = match.type;
|
|
86
96
|
if (match.owner)
|
|
87
97
|
result.owner = match.owner;
|
|
88
98
|
return result;
|
|
@@ -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,oCAAoC,EAAE;IACtF,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACT,
|
|
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,CA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ChH;YACE,UAAU,EAAE,MAAM,CAAC,UAAU;SAC9B,CACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -77,6 +77,7 @@ export declare const noaaMarineFindStations: import("@cyanheads/mcp-ts-core").To
|
|
|
77
77
|
met: "met";
|
|
78
78
|
tide: "tide";
|
|
79
79
|
current: "current";
|
|
80
|
+
current_profile: "current_profile";
|
|
80
81
|
buoy: "buoy";
|
|
81
82
|
}>>>;
|
|
82
83
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -88,7 +89,8 @@ export declare const noaaMarineFindStations: import("@cyanheads/mcp-ts-core").To
|
|
|
88
89
|
coops: "coops";
|
|
89
90
|
ndbc: "ndbc";
|
|
90
91
|
}>;
|
|
91
|
-
type: z.ZodString
|
|
92
|
+
type: z.ZodOptional<z.ZodString>;
|
|
93
|
+
platform: z.ZodOptional<z.ZodString>;
|
|
92
94
|
latitude: z.ZodNumber;
|
|
93
95
|
longitude: z.ZodNumber;
|
|
94
96
|
distance_km: z.ZodOptional<z.ZodNumber>;
|
|
@@ -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
|
|
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"}
|
|
@@ -76,10 +76,13 @@ const STATE_CODES = [
|
|
|
76
76
|
export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
77
77
|
title: 'Find Marine Stations',
|
|
78
78
|
description: 'Find CO-OPS tide/water-level/current stations and NDBC buoys near a location or by name/state. ' +
|
|
79
|
-
'Returns a unified station list with source,
|
|
79
|
+
'Returns a unified station list with source, data capabilities, coordinates, and — for NDBC — the physical platform class. ' +
|
|
80
80
|
'This is the required first step to resolve place names or coordinates to station IDs before calling data tools. ' +
|
|
81
81
|
'CO-OPS station IDs are numeric (e.g. 9447130 for Seattle); current station IDs are alphanumeric (e.g. ACT4176). ' +
|
|
82
82
|
'NDBC buoy IDs are 5-character alphanumeric codes (e.g. 46041). ' +
|
|
83
|
+
'Two axes are reported separately: `capabilities`/`type` describe the data products a station serves ' +
|
|
84
|
+
'(tide, current, water_level, met, current_profile), while `platform` is the NDBC physical classification ' +
|
|
85
|
+
'(buoy, fixed, oilrig, dart, tao, usv, other). CO-OPS stations carry no platform class. ' +
|
|
83
86
|
'Provide latitude and longitude together for proximity search, or query/state for name-based search — both may be combined. ' +
|
|
84
87
|
'Note: CO-OPS current stations are cataloged by monitoring capability, not prediction availability. ' +
|
|
85
88
|
'If noaa_marine_get_currents returns no_predictions for a station, try the next nearest current station.',
|
|
@@ -122,15 +125,20 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
122
125
|
.describe('Data source to search: coops (tide/water-level/current stations), ndbc (buoys), or all (default).'),
|
|
123
126
|
types: z
|
|
124
127
|
.array(z
|
|
125
|
-
.enum(['tide', 'current', 'water_level', '
|
|
126
|
-
.describe(
|
|
127
|
-
'
|
|
128
|
-
'
|
|
129
|
-
'
|
|
128
|
+
.enum(['tide', 'current', 'water_level', 'met', 'current_profile', 'buoy'])
|
|
129
|
+
.describe("Filter value. Five are data capabilities, matched against a station's capabilities list: " +
|
|
130
|
+
'tide (CO-OPS tide predictions → noaa_marine_get_tide_predictions), ' +
|
|
131
|
+
'current (CO-OPS tidal-current predictions → noaa_marine_get_currents), ' +
|
|
132
|
+
'water_level (CO-OPS observed water levels → noaa_marine_get_water_level), ' +
|
|
133
|
+
'met (NDBC meteorological → noaa_marine_get_conditions), ' +
|
|
134
|
+
'current_profile (NDBC observed ocean-current depth profile → noaa_marine_get_current_profile; ' +
|
|
135
|
+
'note this is a different data product and source than CO-OPS `current`). ' +
|
|
136
|
+
'The sixth, buoy, is a physical-platform filter (NDBC platform class equals buoy), not a data ' +
|
|
137
|
+
'capability — use it to select buoy-class platforms regardless of what data they serve.'))
|
|
130
138
|
.optional()
|
|
131
|
-
.describe('Filter by
|
|
132
|
-
'
|
|
133
|
-
'
|
|
139
|
+
.describe('Filter by data capability or NDBC platform class. Every returned station matches at least one requested ' +
|
|
140
|
+
'value — a capability value against its capabilities list, or buoy against its platform class. ' +
|
|
141
|
+
'Omit to return all stations.'),
|
|
134
142
|
limit: z
|
|
135
143
|
.number()
|
|
136
144
|
.int()
|
|
@@ -150,10 +158,18 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
150
158
|
.describe('Data source: coops (CO-OPS) or ndbc (NDBC buoy).'),
|
|
151
159
|
type: z
|
|
152
160
|
.string()
|
|
153
|
-
.
|
|
154
|
-
'
|
|
155
|
-
'
|
|
156
|
-
'
|
|
161
|
+
.optional()
|
|
162
|
+
.describe('The data capability this row leads with — always one of the values in capabilities. When a types ' +
|
|
163
|
+
'filter of capability values is set this is the first requested capability the station has, so it ' +
|
|
164
|
+
'never contradicts the filter; otherwise it is the first capability. Omitted when the station has ' +
|
|
165
|
+
'no data capability (e.g. a bare buoy/fixed platform matched only by a platform filter) — read ' +
|
|
166
|
+
'platform for its identity. This is a data-product axis, never the physical platform class.'),
|
|
167
|
+
platform: z
|
|
168
|
+
.string()
|
|
169
|
+
.optional()
|
|
170
|
+
.describe('NDBC physical platform class: buoy, fixed, oilrig, dart, tao, usv, or other. A different axis than ' +
|
|
171
|
+
'type/capabilities (which describe data products). Omitted for CO-OPS stations — CO-OPS publishes ' +
|
|
172
|
+
'no platform taxonomy.'),
|
|
157
173
|
latitude: z.number().describe('Station latitude in decimal degrees.'),
|
|
158
174
|
longitude: z.number().describe('Station longitude in decimal degrees.'),
|
|
159
175
|
distance_km: z
|
|
@@ -166,7 +182,8 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
166
182
|
.describe('US state or territory code (CO-OPS stations only).'),
|
|
167
183
|
capabilities: z
|
|
168
184
|
.array(z.string().describe('Capability identifier, e.g. "tide", "water_level".'))
|
|
169
|
-
.describe('
|
|
185
|
+
.describe('Data products available at this station: any of tide, current, water_level (CO-OPS) or met, ' +
|
|
186
|
+
'current_profile (NDBC). Empty when the station reports no data capability — platform still identifies it.'),
|
|
170
187
|
})
|
|
171
188
|
.describe('A single station matching the search criteria.'))
|
|
172
189
|
.describe('Stations matching the search criteria, sorted by distance (if lat/lon provided) or name.'),
|
|
@@ -209,15 +226,21 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
209
226
|
const query = input.query?.trim().toLowerCase();
|
|
210
227
|
// An empty types array means the same thing as no types array.
|
|
211
228
|
const typeFilter = input.types?.length ? input.types : undefined;
|
|
212
|
-
/** True when the station carries at least one of the requested capabilities. */
|
|
213
|
-
const matchesTypeFilter = (capabilities) => !typeFilter || typeFilter.some((t) => capabilities.includes(t));
|
|
214
229
|
/**
|
|
215
|
-
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
230
|
+
* True when the station carries at least one of the requested filter values among its
|
|
231
|
+
* match tokens. Callers pass a station's data capabilities plus (for NDBC) its platform
|
|
232
|
+
* class, so a `buoy` platform filter matches a bare platform and a `met` filter matches a
|
|
233
|
+
* capability — both flow through one predicate.
|
|
234
|
+
*/
|
|
235
|
+
const matchesTypeFilter = (tokens) => !typeFilter || typeFilter.some((t) => tokens.includes(t));
|
|
236
|
+
/**
|
|
237
|
+
* The data capability a row leads with — always drawn from `capabilities`, never the
|
|
238
|
+
* platform class. Under a capability filter this is the first requested capability the
|
|
239
|
+
* station has, so `type` never contradicts it; a platform-only filter (`buoy`) matches
|
|
240
|
+
* nothing in capabilities, so `type` falls to the first capability, or undefined when the
|
|
241
|
+
* station has none (its platform then carries its identity).
|
|
219
242
|
*/
|
|
220
|
-
const primaryTypeFor = (capabilities) => typeFilter?.find((t) => capabilities.includes(t)) ?? capabilities[0]
|
|
243
|
+
const primaryTypeFor = (capabilities) => typeFilter?.find((t) => capabilities.includes(t)) ?? capabilities[0];
|
|
221
244
|
const results = [];
|
|
222
245
|
// Fetch CO-OPS and NDBC lists in parallel.
|
|
223
246
|
// `state` is a CO-OPS-only filter — NDBC buoys carry no state, so a state-scoped
|
|
@@ -262,11 +285,13 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
262
285
|
station_id: s.id,
|
|
263
286
|
name: s.name,
|
|
264
287
|
source: 'coops',
|
|
265
|
-
type: primaryTypeFor(s.capabilities),
|
|
266
288
|
latitude: s.lat,
|
|
267
289
|
longitude: s.lng,
|
|
268
290
|
capabilities: s.capabilities,
|
|
269
291
|
};
|
|
292
|
+
const coopsType = primaryTypeFor(s.capabilities);
|
|
293
|
+
if (coopsType)
|
|
294
|
+
entry.type = coopsType;
|
|
270
295
|
if (s.state)
|
|
271
296
|
entry.state = s.state;
|
|
272
297
|
if (center) {
|
|
@@ -281,18 +306,22 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
281
306
|
// Process NDBC stations
|
|
282
307
|
if (ndbcResult.status === 'fulfilled' && ndbcResult.value) {
|
|
283
308
|
for (const s of ndbcResult.value) {
|
|
284
|
-
//
|
|
285
|
-
//
|
|
286
|
-
//
|
|
287
|
-
//
|
|
309
|
+
// Data capabilities come only from the NDBC catalog flags — never the platform class.
|
|
310
|
+
// `current_profile` is NDBC observed ocean currents (the .adcp profile
|
|
311
|
+
// noaa_marine_get_current_profile reads), named apart from CO-OPS `current` (tidal-current
|
|
312
|
+
// predictions) so both stay filterable without a one-letter collision. When both flags are
|
|
313
|
+
// off the list stays empty — a bare platform is not a fabricated "buoy" capability (#13).
|
|
288
314
|
const capabilities = [];
|
|
289
315
|
if (s.hasMet)
|
|
290
316
|
capabilities.push('met');
|
|
291
317
|
if (s.hasCurrents)
|
|
292
|
-
capabilities.push('
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
318
|
+
capabilities.push('current_profile');
|
|
319
|
+
// Platform class (buoy/fixed/oilrig/dart/tao/usv/other) is a separate axis. Fold it into
|
|
320
|
+
// the tokens the filter matches so a `buoy` platform filter reaches bare platforms; only
|
|
321
|
+
// platform values present in the `types` enum (currently just `buoy`) are ever requestable.
|
|
322
|
+
const platform = s.type;
|
|
323
|
+
const matchTokens = platform ? [...capabilities, platform] : capabilities;
|
|
324
|
+
if (!matchesTypeFilter(matchTokens))
|
|
296
325
|
continue;
|
|
297
326
|
if (query && !s.name.toLowerCase().includes(query) && !s.id.toLowerCase().includes(query))
|
|
298
327
|
continue;
|
|
@@ -300,11 +329,15 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
300
329
|
station_id: s.id,
|
|
301
330
|
name: s.name,
|
|
302
331
|
source: 'ndbc',
|
|
303
|
-
type: primaryTypeFor(capabilities),
|
|
304
332
|
latitude: s.lat,
|
|
305
333
|
longitude: s.lon,
|
|
306
334
|
capabilities,
|
|
307
335
|
};
|
|
336
|
+
const ndbcType = primaryTypeFor(capabilities);
|
|
337
|
+
if (ndbcType)
|
|
338
|
+
entry.type = ndbcType;
|
|
339
|
+
if (platform)
|
|
340
|
+
entry.platform = platform;
|
|
308
341
|
if (center) {
|
|
309
342
|
const dist = haversineKm(center.lat, center.lon, s.lat, s.lon);
|
|
310
343
|
if (dist > input.radius_km)
|
|
@@ -350,7 +383,9 @@ export const noaaMarineFindStations = tool('noaa_marine_find_stations', {
|
|
|
350
383
|
for (const s of result.stations) {
|
|
351
384
|
const dist = s.distance_km !== undefined ? ` · ${s.distance_km} km` : '';
|
|
352
385
|
const state = s.state ? ` · ${s.state}` : '';
|
|
353
|
-
|
|
386
|
+
const typeStr = s.type ? ` · **Type:** ${s.type}` : '';
|
|
387
|
+
const platformStr = s.platform ? ` · **Platform:** ${s.platform}` : '';
|
|
388
|
+
lines.push(`### ${s.name} (${s.station_id})`, `**Source:** ${s.source.toUpperCase()}${typeStr}${platformStr}${dist}${state}`, `**Coordinates:** ${s.latitude}, ${s.longitude}`, `**Capabilities:** ${s.capabilities.length > 0 ? s.capabilities.join(', ') : 'none reported'}`, '');
|
|
354
389
|
}
|
|
355
390
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
356
391
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noaa-marine-find-stations.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/noaa-marine-find-stations.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,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,0DAA0D;AAC1D,SAAS,WAAW,CAAC,IAAY,EAAE,IAAY,EAAE,IAAY,EAAE,IAAY;IACzE,MAAM,CAAC,GAAG,IAAI,CAAC;IACf,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IAC7C,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,EA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SAAS,EAAE,EAChD,qBAAqB,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAChD,EAAE,CACH,CAAC;QACJ,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"}
|
|
1
|
+
{"version":3,"file":"noaa-marine-find-stations.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/noaa-marine-find-stations.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,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,0DAA0D;AAC1D,SAAS,WAAW,CAAC,IAAY,EAAE,IAAY,EAAE,IAAY,EAAE,IAAY;IACzE,MAAM,CAAC,GAAG,IAAI,CAAC;IACf,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IAC7C,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;IAC7C,MAAM,CAAC,GACL,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,GAA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AAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,MAAM,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,MAAM,WAAW,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvE,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,UAAU,GAAG,EACjC,eAAe,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,KAAK,EAAE,EAC9E,oBAAoB,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,EAAE,EAChD,qBAAqB,CAAC,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE,EAC9F,EAAE,CACH,CAAC;QACJ,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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview noaa_marine_get_current_profile tool — observed depth-binned currents from an NDBC ADCP buoy.
|
|
3
|
+
* @module mcp-server/tools/definitions/noaa-marine-get-current-profile.tool
|
|
4
|
+
*/
|
|
5
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
export declare const noaaMarineGetCurrentProfile: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
|
+
station_id: z.ZodString;
|
|
9
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
station_id: z.ZodString;
|
|
11
|
+
station_name: z.ZodString;
|
|
12
|
+
latitude: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
longitude: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
observed_at: z.ZodString;
|
|
15
|
+
source: z.ZodString;
|
|
16
|
+
bin_count: z.ZodNumber;
|
|
17
|
+
bins: z.ZodArray<z.ZodObject<{
|
|
18
|
+
depth_m: z.ZodNumber;
|
|
19
|
+
direction_deg: z.ZodNullable<z.ZodNumber>;
|
|
20
|
+
speed_cm_s: z.ZodNullable<z.ZodNumber>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>, readonly [{
|
|
23
|
+
readonly reason: "profile_not_found";
|
|
24
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
25
|
+
readonly when: "NDBC returned 404 for the station — no ADCP current-profile file exists for it.";
|
|
26
|
+
readonly recovery: "Find a current-profile-capable station with noaa_marine_find_stations using source=\"ndbc\" and types=[\"current_profile\"] — most NDBC stations serve no ADCP profile.";
|
|
27
|
+
}, {
|
|
28
|
+
readonly reason: "no_current_data";
|
|
29
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
30
|
+
readonly when: "The ADCP file exists but has no usable data rows — profiler offline or every bin missing.";
|
|
31
|
+
readonly recovery: "This station may be temporarily offline — try another from noaa_marine_find_stations with source=\"ndbc\" and types=[\"current_profile\"].";
|
|
32
|
+
}], undefined>;
|
|
33
|
+
//# sourceMappingURL=noaa-marine-get-current-profile.tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noaa-marine-get-current-profile.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/noaa-marine-get-current-profile.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAG3E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;cAuJtC,CAAC"}
|