@ryancardin/noaa-tides-currents-mcp-server 2.0.0 → 2.1.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/LICENSE +1 -1
- package/README.md +18 -5
- package/dist/client/deadline.d.ts +6 -0
- package/dist/client/deadline.js +23 -0
- package/dist/client/http.d.ts +2 -0
- package/dist/client/http.js +75 -4
- package/dist/constants.d.ts +11 -0
- package/dist/constants.js +11 -0
- package/dist/format/respond.d.ts +37 -1
- package/dist/format/respond.js +45 -10
- package/dist/index.js +0 -0
- package/dist/reference/content.d.ts +1 -1
- package/dist/reference/content.js +24 -0
- package/dist/resources/index.js +8 -0
- package/dist/services/nws-api.d.ts +115 -0
- package/dist/services/nws-api.js +267 -0
- package/dist/tools/astronomy.js +6 -1
- package/dist/tools/currents.js +3 -1
- package/dist/tools/derived.js +6 -1
- package/dist/tools/index.js +12 -0
- package/dist/tools/marine-forecast.d.ts +7 -0
- package/dist/tools/marine-forecast.js +177 -0
- package/dist/tools/met.js +2 -1
- package/dist/tools/reference.js +4 -0
- package/dist/tools/station-metadata.js +4 -1
- package/dist/tools/stations.js +4 -1
- package/dist/tools/water.js +4 -1
- package/package.json +6 -6
- package/dist/interfaces/config.d.ts +0 -6
- package/dist/interfaces/config.js +0 -1
- package/dist/interfaces/noaa.d.ts +0 -334
- package/dist/interfaces/noaa.js +0 -98
- package/dist/interfaces/parameters.d.ts +0 -18
- package/dist/interfaces/parameters.js +0 -5
- package/dist/mcp-server.d.ts +0 -12
- package/dist/mcp-server.js +0 -103
- package/dist/moon-phase-service.d.ts +0 -122
- package/dist/moon-phase-service.js +0 -187
- package/dist/noaa-service.d.ts +0 -60
- package/dist/noaa-service.js +0 -159
- package/dist/schemas/dpapi.d.ts +0 -198
- package/dist/schemas/dpapi.js +0 -89
- package/dist/server/config.d.ts +0 -9
- package/dist/server/config.js +0 -40
- package/dist/server/mcp-server.d.ts +0 -12
- package/dist/server/mcp-server.js +0 -103
- package/dist/services/dpapi-service.d.ts +0 -72
- package/dist/services/dpapi-service.js +0 -164
- package/dist/services/noaa-parameters-service.d.ts +0 -76
- package/dist/services/noaa-parameters-service.js +0 -128
- package/dist/services/noaa-service.d.ts +0 -52
- package/dist/services/noaa-service.js +0 -151
- package/dist/sun-service.d.ts +0 -184
- package/dist/sun-service.js +0 -218
- package/dist/tools/derived-product-tools.d.ts +0 -6
- package/dist/tools/derived-product-tools.js +0 -168
- package/dist/tools/moon-tools.d.ts +0 -6
- package/dist/tools/moon-tools.js +0 -69
- package/dist/tools/parameter-tools.d.ts +0 -6
- package/dist/tools/parameter-tools.js +0 -77
- package/dist/tools/station-tools.d.ts +0 -6
- package/dist/tools/station-tools.js +0 -51
- package/dist/tools/sun-tools.d.ts +0 -6
- package/dist/tools/sun-tools.js +0 -109
- package/dist/tools/water-tools.d.ts +0 -6
- package/dist/tools/water-tools.js +0 -150
- package/dist/types.d.ts +0 -337
- package/dist/types.js +0 -98
package/dist/tools/stations.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { findNearestStations, getStationInfo, searchStations, STATION_TYPES, } from "../services/metadata-api.js";
|
|
6
6
|
import { LatitudeSchema, LongitudeSchema, READ_ONLY_ANNOTATIONS, ResponseFormatSchema, StationIdSchema, UnitsSchema, } from "../schemas/common.js";
|
|
7
|
-
import { markdownTable, respond, respondError } from "../format/respond.js";
|
|
7
|
+
import { markdownTable, respond, respondError, RawToolOutputSchema, } from "../format/respond.js";
|
|
8
8
|
const StationTypeSchema = z
|
|
9
9
|
.enum(STATION_TYPES)
|
|
10
10
|
.describe('Station capability filter. Common: "waterlevels" (active water level), "tidepredictions", "currents" (observed currents), "currentpredictions", "met" (weather sensors). Full list via noaa_get_reference_guide topic "station_types".');
|
|
@@ -65,6 +65,7 @@ Returns id, name, location, tide type, Great Lakes flag, and for prediction stat
|
|
|
65
65
|
response_format: ResponseFormatSchema,
|
|
66
66
|
},
|
|
67
67
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
68
|
+
outputSchema: RawToolOutputSchema,
|
|
68
69
|
}, async (params) => {
|
|
69
70
|
try {
|
|
70
71
|
const matches = await searchStations({
|
|
@@ -145,6 +146,7 @@ Distance is computed great-circle (Haversine) and reported in both km and miles.
|
|
|
145
146
|
response_format: ResponseFormatSchema,
|
|
146
147
|
},
|
|
147
148
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
149
|
+
outputSchema: RawToolOutputSchema,
|
|
148
150
|
}, async (params) => {
|
|
149
151
|
try {
|
|
150
152
|
const nearest = await findNearestStations(params.latitude, params.longitude, params.type, params.limit, params.max_distance_km);
|
|
@@ -220,6 +222,7 @@ Use this before requesting data to confirm what the station actually collects. F
|
|
|
220
222
|
response_format: ResponseFormatSchema,
|
|
221
223
|
},
|
|
222
224
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
225
|
+
outputSchema: RawToolOutputSchema,
|
|
223
226
|
}, async (params) => {
|
|
224
227
|
try {
|
|
225
228
|
const payload = await getStationInfo(params.station, params.expand, params.units);
|
package/dist/tools/water.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { getWaterLevels, getWaterLevelSummaries, getTidePredictions, } from "../services/data-api.js";
|
|
6
6
|
import { dateFields, DatumSchema, READ_ONLY_ANNOTATIONS, ResponseFormatSchema, StationIdSchema, TimeZoneSchema, UnitsSchema, } from "../schemas/common.js";
|
|
7
|
-
import { respond, respondError } from "../format/respond.js";
|
|
7
|
+
import { respond, respondError, RawToolOutputSchema, } from "../format/respond.js";
|
|
8
8
|
import { seriesMarkdown, timeZoneLabel } from "../format/series.js";
|
|
9
9
|
import { FLAG_LEGENDS, unitLabel } from "../format/units.js";
|
|
10
10
|
function metadataName(response) {
|
|
@@ -33,6 +33,7 @@ Use for: "what is the water level right now" (date=latest), storm surge analysis
|
|
|
33
33
|
response_format: ResponseFormatSchema,
|
|
34
34
|
},
|
|
35
35
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
36
|
+
outputSchema: RawToolOutputSchema,
|
|
36
37
|
}, async (params) => {
|
|
37
38
|
try {
|
|
38
39
|
const { product, response } = await getWaterLevels(params);
|
|
@@ -104,6 +105,7 @@ Use for: historical extremes, mixed-tide analysis (HH vs H), long-term averages.
|
|
|
104
105
|
response_format: ResponseFormatSchema,
|
|
105
106
|
},
|
|
106
107
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
108
|
+
outputSchema: RawToolOutputSchema,
|
|
107
109
|
}, async (params) => {
|
|
108
110
|
try {
|
|
109
111
|
const { response, timeZoneForced } = await getWaterLevelSummaries(params);
|
|
@@ -221,6 +223,7 @@ Heights are relative to the requested datum (MLLW default). Notes:
|
|
|
221
223
|
response_format: ResponseFormatSchema,
|
|
222
224
|
},
|
|
223
225
|
annotations: READ_ONLY_ANNOTATIONS,
|
|
226
|
+
outputSchema: RawToolOutputSchema,
|
|
224
227
|
}, async (params) => {
|
|
225
228
|
try {
|
|
226
229
|
const response = await getTidePredictions(params);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryancardin/noaa-tides-currents-mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "MCP server for NOAA CO-OPS Tides and Currents: water levels, tide predictions, currents, meteorology, station metadata, datums, high tide flooding, sea level trends, plus sun and moon calculations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"model-context-protocol",
|
|
35
35
|
"api"
|
|
36
36
|
],
|
|
37
|
-
"author": "
|
|
38
|
-
"mcpName": "io.github.
|
|
37
|
+
"author": "Cardin Labs <support@cardinlabs.com> (https://cardinlabs.com)",
|
|
38
|
+
"mcpName": "io.github.RyanCardin15/noaa-tides-and-currents-mcp",
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
|
41
|
-
"url": "https://github.com/RyanCardin15/
|
|
41
|
+
"url": "https://github.com/RyanCardin15/Perigee-Tides.git"
|
|
42
42
|
},
|
|
43
43
|
"bugs": {
|
|
44
|
-
"url": "https://github.com/RyanCardin15/
|
|
44
|
+
"url": "https://github.com/RyanCardin15/Perigee-Tides/issues"
|
|
45
45
|
},
|
|
46
|
-
"homepage": "https://github.com/RyanCardin15/
|
|
46
|
+
"homepage": "https://github.com/RyanCardin15/Perigee-Tides#readme",
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const GetWaterLevelsSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
-
station: z.ZodString;
|
|
4
|
-
date: z.ZodOptional<z.ZodString>;
|
|
5
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
6
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
7
|
-
range: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
datum: z.ZodOptional<z.ZodString>;
|
|
9
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
10
|
-
time_zone: z.ZodOptional<z.ZodEnum<["gmt", "lst", "lst_ldt"]>>;
|
|
11
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
12
|
-
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
station: string;
|
|
14
|
-
date?: string | undefined;
|
|
15
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
16
|
-
end_date?: string | undefined;
|
|
17
|
-
units?: "english" | "metric" | undefined;
|
|
18
|
-
begin_date?: string | undefined;
|
|
19
|
-
range?: number | undefined;
|
|
20
|
-
datum?: string | undefined;
|
|
21
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
station: string;
|
|
24
|
-
date?: string | undefined;
|
|
25
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
26
|
-
end_date?: string | undefined;
|
|
27
|
-
units?: "english" | "metric" | undefined;
|
|
28
|
-
begin_date?: string | undefined;
|
|
29
|
-
range?: number | undefined;
|
|
30
|
-
datum?: string | undefined;
|
|
31
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
32
|
-
}>, {
|
|
33
|
-
station: string;
|
|
34
|
-
date?: string | undefined;
|
|
35
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
36
|
-
end_date?: string | undefined;
|
|
37
|
-
units?: "english" | "metric" | undefined;
|
|
38
|
-
begin_date?: string | undefined;
|
|
39
|
-
range?: number | undefined;
|
|
40
|
-
datum?: string | undefined;
|
|
41
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
42
|
-
}, {
|
|
43
|
-
station: string;
|
|
44
|
-
date?: string | undefined;
|
|
45
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
46
|
-
end_date?: string | undefined;
|
|
47
|
-
units?: "english" | "metric" | undefined;
|
|
48
|
-
begin_date?: string | undefined;
|
|
49
|
-
range?: number | undefined;
|
|
50
|
-
datum?: string | undefined;
|
|
51
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
52
|
-
}>;
|
|
53
|
-
export declare const GetTidePredictionsSchema: z.ZodEffects<z.ZodObject<{
|
|
54
|
-
station: z.ZodString;
|
|
55
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
56
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
57
|
-
date: z.ZodOptional<z.ZodString>;
|
|
58
|
-
range: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
datum: z.ZodOptional<z.ZodString>;
|
|
60
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
61
|
-
time_zone: z.ZodOptional<z.ZodEnum<["gmt", "lst", "lst_ldt"]>>;
|
|
62
|
-
interval: z.ZodOptional<z.ZodString>;
|
|
63
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
station: string;
|
|
66
|
-
interval?: string | undefined;
|
|
67
|
-
date?: string | undefined;
|
|
68
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
69
|
-
end_date?: string | undefined;
|
|
70
|
-
units?: "english" | "metric" | undefined;
|
|
71
|
-
begin_date?: string | undefined;
|
|
72
|
-
range?: number | undefined;
|
|
73
|
-
datum?: string | undefined;
|
|
74
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
75
|
-
}, {
|
|
76
|
-
station: string;
|
|
77
|
-
interval?: string | undefined;
|
|
78
|
-
date?: string | undefined;
|
|
79
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
80
|
-
end_date?: string | undefined;
|
|
81
|
-
units?: "english" | "metric" | undefined;
|
|
82
|
-
begin_date?: string | undefined;
|
|
83
|
-
range?: number | undefined;
|
|
84
|
-
datum?: string | undefined;
|
|
85
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
86
|
-
}>, {
|
|
87
|
-
station: string;
|
|
88
|
-
interval?: string | undefined;
|
|
89
|
-
date?: string | undefined;
|
|
90
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
91
|
-
end_date?: string | undefined;
|
|
92
|
-
units?: "english" | "metric" | undefined;
|
|
93
|
-
begin_date?: string | undefined;
|
|
94
|
-
range?: number | undefined;
|
|
95
|
-
datum?: string | undefined;
|
|
96
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
97
|
-
}, {
|
|
98
|
-
station: string;
|
|
99
|
-
interval?: string | undefined;
|
|
100
|
-
date?: string | undefined;
|
|
101
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
102
|
-
end_date?: string | undefined;
|
|
103
|
-
units?: "english" | "metric" | undefined;
|
|
104
|
-
begin_date?: string | undefined;
|
|
105
|
-
range?: number | undefined;
|
|
106
|
-
datum?: string | undefined;
|
|
107
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
108
|
-
}>;
|
|
109
|
-
export declare const GetCurrentsSchema: z.ZodEffects<z.ZodObject<{
|
|
110
|
-
station: z.ZodString;
|
|
111
|
-
date: z.ZodOptional<z.ZodString>;
|
|
112
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
113
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
114
|
-
range: z.ZodOptional<z.ZodNumber>;
|
|
115
|
-
bin: z.ZodOptional<z.ZodNumber>;
|
|
116
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
117
|
-
time_zone: z.ZodOptional<z.ZodEnum<["gmt", "lst", "lst_ldt"]>>;
|
|
118
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
119
|
-
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
station: string;
|
|
121
|
-
date?: string | undefined;
|
|
122
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
123
|
-
end_date?: string | undefined;
|
|
124
|
-
units?: "english" | "metric" | undefined;
|
|
125
|
-
begin_date?: string | undefined;
|
|
126
|
-
range?: number | undefined;
|
|
127
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
128
|
-
bin?: number | undefined;
|
|
129
|
-
}, {
|
|
130
|
-
station: string;
|
|
131
|
-
date?: string | undefined;
|
|
132
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
133
|
-
end_date?: string | undefined;
|
|
134
|
-
units?: "english" | "metric" | undefined;
|
|
135
|
-
begin_date?: string | undefined;
|
|
136
|
-
range?: number | undefined;
|
|
137
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
138
|
-
bin?: number | undefined;
|
|
139
|
-
}>, {
|
|
140
|
-
station: string;
|
|
141
|
-
date?: string | undefined;
|
|
142
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
143
|
-
end_date?: string | undefined;
|
|
144
|
-
units?: "english" | "metric" | undefined;
|
|
145
|
-
begin_date?: string | undefined;
|
|
146
|
-
range?: number | undefined;
|
|
147
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
148
|
-
bin?: number | undefined;
|
|
149
|
-
}, {
|
|
150
|
-
station: string;
|
|
151
|
-
date?: string | undefined;
|
|
152
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
153
|
-
end_date?: string | undefined;
|
|
154
|
-
units?: "english" | "metric" | undefined;
|
|
155
|
-
begin_date?: string | undefined;
|
|
156
|
-
range?: number | undefined;
|
|
157
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
158
|
-
bin?: number | undefined;
|
|
159
|
-
}>;
|
|
160
|
-
export declare const GetCurrentPredictionsSchema: z.ZodEffects<z.ZodObject<{
|
|
161
|
-
station: z.ZodString;
|
|
162
|
-
date: z.ZodOptional<z.ZodString>;
|
|
163
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
164
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
165
|
-
range: z.ZodOptional<z.ZodNumber>;
|
|
166
|
-
bin: z.ZodOptional<z.ZodNumber>;
|
|
167
|
-
interval: z.ZodOptional<z.ZodString>;
|
|
168
|
-
vel_type: z.ZodOptional<z.ZodEnum<["speed_dir", "default"]>>;
|
|
169
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
170
|
-
time_zone: z.ZodOptional<z.ZodEnum<["gmt", "lst", "lst_ldt"]>>;
|
|
171
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
172
|
-
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
station: string;
|
|
174
|
-
interval?: string | undefined;
|
|
175
|
-
date?: string | undefined;
|
|
176
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
177
|
-
end_date?: string | undefined;
|
|
178
|
-
units?: "english" | "metric" | undefined;
|
|
179
|
-
begin_date?: string | undefined;
|
|
180
|
-
range?: number | undefined;
|
|
181
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
182
|
-
bin?: number | undefined;
|
|
183
|
-
vel_type?: "default" | "speed_dir" | undefined;
|
|
184
|
-
}, {
|
|
185
|
-
station: string;
|
|
186
|
-
interval?: string | undefined;
|
|
187
|
-
date?: string | undefined;
|
|
188
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
189
|
-
end_date?: string | undefined;
|
|
190
|
-
units?: "english" | "metric" | undefined;
|
|
191
|
-
begin_date?: string | undefined;
|
|
192
|
-
range?: number | undefined;
|
|
193
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
194
|
-
bin?: number | undefined;
|
|
195
|
-
vel_type?: "default" | "speed_dir" | undefined;
|
|
196
|
-
}>, {
|
|
197
|
-
station: string;
|
|
198
|
-
interval?: string | undefined;
|
|
199
|
-
date?: string | undefined;
|
|
200
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
201
|
-
end_date?: string | undefined;
|
|
202
|
-
units?: "english" | "metric" | undefined;
|
|
203
|
-
begin_date?: string | undefined;
|
|
204
|
-
range?: number | undefined;
|
|
205
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
206
|
-
bin?: number | undefined;
|
|
207
|
-
vel_type?: "default" | "speed_dir" | undefined;
|
|
208
|
-
}, {
|
|
209
|
-
station: string;
|
|
210
|
-
interval?: string | undefined;
|
|
211
|
-
date?: string | undefined;
|
|
212
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
213
|
-
end_date?: string | undefined;
|
|
214
|
-
units?: "english" | "metric" | undefined;
|
|
215
|
-
begin_date?: string | undefined;
|
|
216
|
-
range?: number | undefined;
|
|
217
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
218
|
-
bin?: number | undefined;
|
|
219
|
-
vel_type?: "default" | "speed_dir" | undefined;
|
|
220
|
-
}>;
|
|
221
|
-
export declare const GetMeteorologicalDataSchema: z.ZodEffects<z.ZodObject<{
|
|
222
|
-
station: z.ZodString;
|
|
223
|
-
product: z.ZodString;
|
|
224
|
-
date: z.ZodOptional<z.ZodString>;
|
|
225
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
226
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
227
|
-
range: z.ZodOptional<z.ZodNumber>;
|
|
228
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
229
|
-
time_zone: z.ZodOptional<z.ZodEnum<["gmt", "lst", "lst_ldt"]>>;
|
|
230
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
231
|
-
}, "strip", z.ZodTypeAny, {
|
|
232
|
-
product: string;
|
|
233
|
-
station: string;
|
|
234
|
-
date?: string | undefined;
|
|
235
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
236
|
-
end_date?: string | undefined;
|
|
237
|
-
units?: "english" | "metric" | undefined;
|
|
238
|
-
begin_date?: string | undefined;
|
|
239
|
-
range?: number | undefined;
|
|
240
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
241
|
-
}, {
|
|
242
|
-
product: string;
|
|
243
|
-
station: string;
|
|
244
|
-
date?: string | undefined;
|
|
245
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
246
|
-
end_date?: string | undefined;
|
|
247
|
-
units?: "english" | "metric" | undefined;
|
|
248
|
-
begin_date?: string | undefined;
|
|
249
|
-
range?: number | undefined;
|
|
250
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
251
|
-
}>, {
|
|
252
|
-
product: string;
|
|
253
|
-
station: string;
|
|
254
|
-
date?: string | undefined;
|
|
255
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
256
|
-
end_date?: string | undefined;
|
|
257
|
-
units?: "english" | "metric" | undefined;
|
|
258
|
-
begin_date?: string | undefined;
|
|
259
|
-
range?: number | undefined;
|
|
260
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
261
|
-
}, {
|
|
262
|
-
product: string;
|
|
263
|
-
station: string;
|
|
264
|
-
date?: string | undefined;
|
|
265
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
266
|
-
end_date?: string | undefined;
|
|
267
|
-
units?: "english" | "metric" | undefined;
|
|
268
|
-
begin_date?: string | undefined;
|
|
269
|
-
range?: number | undefined;
|
|
270
|
-
time_zone?: "gmt" | "lst" | "lst_ldt" | undefined;
|
|
271
|
-
}>;
|
|
272
|
-
export declare const GetStationsSchema: z.ZodObject<{
|
|
273
|
-
type: z.ZodOptional<z.ZodString>;
|
|
274
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
275
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml"]>>;
|
|
276
|
-
name: z.ZodOptional<z.ZodString>;
|
|
277
|
-
lat_min: z.ZodOptional<z.ZodNumber>;
|
|
278
|
-
lat_max: z.ZodOptional<z.ZodNumber>;
|
|
279
|
-
lon_min: z.ZodOptional<z.ZodNumber>;
|
|
280
|
-
lon_max: z.ZodOptional<z.ZodNumber>;
|
|
281
|
-
state: z.ZodOptional<z.ZodString>;
|
|
282
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
283
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
284
|
-
sort_by: z.ZodOptional<z.ZodEnum<["name", "id", "state"]>>;
|
|
285
|
-
sort_order: z.ZodOptional<z.ZodEnum<["asc", "desc"]>>;
|
|
286
|
-
}, "strip", z.ZodTypeAny, {
|
|
287
|
-
name?: string | undefined;
|
|
288
|
-
type?: string | undefined;
|
|
289
|
-
offset?: number | undefined;
|
|
290
|
-
state?: string | undefined;
|
|
291
|
-
lat_min?: number | undefined;
|
|
292
|
-
lat_max?: number | undefined;
|
|
293
|
-
lon_min?: number | undefined;
|
|
294
|
-
lon_max?: number | undefined;
|
|
295
|
-
limit?: number | undefined;
|
|
296
|
-
sort_by?: "name" | "id" | "state" | undefined;
|
|
297
|
-
sort_order?: "desc" | "asc" | undefined;
|
|
298
|
-
format?: "json" | "xml" | undefined;
|
|
299
|
-
units?: "english" | "metric" | undefined;
|
|
300
|
-
}, {
|
|
301
|
-
name?: string | undefined;
|
|
302
|
-
type?: string | undefined;
|
|
303
|
-
offset?: number | undefined;
|
|
304
|
-
state?: string | undefined;
|
|
305
|
-
lat_min?: number | undefined;
|
|
306
|
-
lat_max?: number | undefined;
|
|
307
|
-
lon_min?: number | undefined;
|
|
308
|
-
lon_max?: number | undefined;
|
|
309
|
-
limit?: number | undefined;
|
|
310
|
-
sort_by?: "name" | "id" | "state" | undefined;
|
|
311
|
-
sort_order?: "desc" | "asc" | undefined;
|
|
312
|
-
format?: "json" | "xml" | undefined;
|
|
313
|
-
units?: "english" | "metric" | undefined;
|
|
314
|
-
}>;
|
|
315
|
-
export declare const GetStationDetailsSchema: z.ZodObject<{
|
|
316
|
-
station: z.ZodString;
|
|
317
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
318
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml"]>>;
|
|
319
|
-
}, "strip", z.ZodTypeAny, {
|
|
320
|
-
station: string;
|
|
321
|
-
format?: "json" | "xml" | undefined;
|
|
322
|
-
units?: "english" | "metric" | undefined;
|
|
323
|
-
}, {
|
|
324
|
-
station: string;
|
|
325
|
-
format?: "json" | "xml" | undefined;
|
|
326
|
-
units?: "english" | "metric" | undefined;
|
|
327
|
-
}>;
|
|
328
|
-
export type GetWaterLevelsParams = z.infer<typeof GetWaterLevelsSchema>;
|
|
329
|
-
export type GetTidePredictionsParams = z.infer<typeof GetTidePredictionsSchema>;
|
|
330
|
-
export type GetCurrentsParams = z.infer<typeof GetCurrentsSchema>;
|
|
331
|
-
export type GetCurrentPredictionsParams = z.infer<typeof GetCurrentPredictionsSchema>;
|
|
332
|
-
export type GetMeteorologicalDataParams = z.infer<typeof GetMeteorologicalDataSchema>;
|
|
333
|
-
export type GetStationsParams = z.infer<typeof GetStationsSchema>;
|
|
334
|
-
export type GetStationDetailsParams = z.infer<typeof GetStationDetailsSchema>;
|
package/dist/interfaces/noaa.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// Common parameter schemas
|
|
3
|
-
const StationSchema = z.string().min(1).describe('Station ID');
|
|
4
|
-
const DateSchema = z.string().optional().describe('Date to retrieve data for ("today", "latest", "recent", or specific date)');
|
|
5
|
-
const BeginDateSchema = z.string().optional().describe('Start date (YYYYMMDD or MM/DD/YYYY)');
|
|
6
|
-
const EndDateSchema = z.string().optional().describe('End date (YYYYMMDD or MM/DD/YYYY)');
|
|
7
|
-
const RangeSchema = z.number().optional().describe('Number of hours to retrieve data for');
|
|
8
|
-
const DatumSchema = z.string().optional().describe('Datum to use (MLLW, MSL, etc.)');
|
|
9
|
-
const UnitsSchema = z.enum(['english', 'metric']).optional().describe('Units to use ("english" or "metric")');
|
|
10
|
-
const TimeZoneSchema = z.enum(['gmt', 'lst', 'lst_ldt']).optional().describe('Time zone (gmt, lst, lst_ldt)');
|
|
11
|
-
const FormatSchema = z.enum(['json', 'xml', 'csv']).optional().describe('Output format (json, xml, csv)');
|
|
12
|
-
const BinSchema = z.number().optional().describe('Bin number');
|
|
13
|
-
const IntervalSchema = z.string().optional().describe('Interval (hilo, hl, h, or a number for minutes)');
|
|
14
|
-
// Water Level Schema
|
|
15
|
-
export const GetWaterLevelsSchema = z.object({
|
|
16
|
-
station: StationSchema,
|
|
17
|
-
date: DateSchema,
|
|
18
|
-
begin_date: BeginDateSchema,
|
|
19
|
-
end_date: EndDateSchema,
|
|
20
|
-
range: RangeSchema,
|
|
21
|
-
datum: DatumSchema,
|
|
22
|
-
units: UnitsSchema,
|
|
23
|
-
time_zone: TimeZoneSchema,
|
|
24
|
-
format: FormatSchema,
|
|
25
|
-
}).refine(data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range), { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" });
|
|
26
|
-
// Tide Predictions Schema
|
|
27
|
-
export const GetTidePredictionsSchema = z.object({
|
|
28
|
-
station: StationSchema,
|
|
29
|
-
begin_date: BeginDateSchema,
|
|
30
|
-
end_date: EndDateSchema,
|
|
31
|
-
date: DateSchema,
|
|
32
|
-
range: RangeSchema,
|
|
33
|
-
datum: DatumSchema,
|
|
34
|
-
units: UnitsSchema,
|
|
35
|
-
time_zone: TimeZoneSchema,
|
|
36
|
-
interval: IntervalSchema,
|
|
37
|
-
format: FormatSchema,
|
|
38
|
-
}).refine(data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range), { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" });
|
|
39
|
-
// Currents Schema
|
|
40
|
-
export const GetCurrentsSchema = z.object({
|
|
41
|
-
station: StationSchema,
|
|
42
|
-
date: DateSchema,
|
|
43
|
-
begin_date: BeginDateSchema,
|
|
44
|
-
end_date: EndDateSchema,
|
|
45
|
-
range: RangeSchema,
|
|
46
|
-
bin: BinSchema,
|
|
47
|
-
units: UnitsSchema,
|
|
48
|
-
time_zone: TimeZoneSchema,
|
|
49
|
-
format: FormatSchema,
|
|
50
|
-
}).refine(data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range), { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" });
|
|
51
|
-
// Current Predictions Schema
|
|
52
|
-
export const GetCurrentPredictionsSchema = z.object({
|
|
53
|
-
station: StationSchema,
|
|
54
|
-
date: DateSchema,
|
|
55
|
-
begin_date: BeginDateSchema,
|
|
56
|
-
end_date: EndDateSchema,
|
|
57
|
-
range: RangeSchema,
|
|
58
|
-
bin: BinSchema,
|
|
59
|
-
interval: z.string().optional().describe('Interval (MAX_SLACK or a number for minutes)'),
|
|
60
|
-
vel_type: z.enum(['speed_dir', 'default']).optional().describe('Velocity type (speed_dir or default)'),
|
|
61
|
-
units: UnitsSchema,
|
|
62
|
-
time_zone: TimeZoneSchema,
|
|
63
|
-
format: FormatSchema,
|
|
64
|
-
}).refine(data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range), { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" });
|
|
65
|
-
// Meteorological Data Schema
|
|
66
|
-
export const GetMeteorologicalDataSchema = z.object({
|
|
67
|
-
station: StationSchema,
|
|
68
|
-
product: z.string().min(1).describe('Product (air_temperature, wind, etc.)'),
|
|
69
|
-
date: DateSchema,
|
|
70
|
-
begin_date: BeginDateSchema,
|
|
71
|
-
end_date: EndDateSchema,
|
|
72
|
-
range: RangeSchema,
|
|
73
|
-
units: UnitsSchema,
|
|
74
|
-
time_zone: TimeZoneSchema,
|
|
75
|
-
format: FormatSchema,
|
|
76
|
-
}).refine(data => (data.date || (data.begin_date && data.end_date) || (data.begin_date && data.range) || (data.end_date && data.range) || data.range), { message: "You must provide either 'date', 'begin_date' and 'end_date', 'begin_date' and 'range', 'end_date' and 'range', or just 'range'" });
|
|
77
|
-
// Station List Schema
|
|
78
|
-
export const GetStationsSchema = z.object({
|
|
79
|
-
type: z.string().optional().describe('Station type (waterlevels, currents, etc.)'),
|
|
80
|
-
units: UnitsSchema,
|
|
81
|
-
format: z.enum(['json', 'xml']).optional().describe('Output format (json, xml)'),
|
|
82
|
-
name: z.string().optional().describe('Filter stations by name (partial match)'),
|
|
83
|
-
lat_min: z.number().optional().describe('Minimum latitude boundary'),
|
|
84
|
-
lat_max: z.number().optional().describe('Maximum latitude boundary'),
|
|
85
|
-
lon_min: z.number().optional().describe('Minimum longitude boundary'),
|
|
86
|
-
lon_max: z.number().optional().describe('Maximum longitude boundary'),
|
|
87
|
-
state: z.string().optional().describe('Filter stations by state code (e.g., CA, NY)'),
|
|
88
|
-
limit: z.number().optional().describe('Maximum number of stations to return'),
|
|
89
|
-
offset: z.number().optional().describe('Number of stations to skip for pagination'),
|
|
90
|
-
sort_by: z.enum(['name', 'id', 'state']).optional().describe('Field to sort results by'),
|
|
91
|
-
sort_order: z.enum(['asc', 'desc']).optional().describe('Sort order (ascending or descending)'),
|
|
92
|
-
});
|
|
93
|
-
// Station Details Schema
|
|
94
|
-
export const GetStationDetailsSchema = z.object({
|
|
95
|
-
station: StationSchema,
|
|
96
|
-
units: UnitsSchema,
|
|
97
|
-
format: z.enum(['json', 'xml']).optional().describe('Output format (json, xml)'),
|
|
98
|
-
});
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const ParameterSchema: z.ZodObject<{
|
|
3
|
-
parameter: z.ZodOptional<z.ZodString>;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
parameter?: string | undefined;
|
|
6
|
-
}, {
|
|
7
|
-
parameter?: string | undefined;
|
|
8
|
-
}>;
|
|
9
|
-
export type GetParametersParams = z.infer<typeof ParameterSchema>;
|
|
10
|
-
export interface ParameterInfo {
|
|
11
|
-
id: string;
|
|
12
|
-
description: string;
|
|
13
|
-
}
|
|
14
|
-
export interface DateFormatInfo {
|
|
15
|
-
format: string;
|
|
16
|
-
description: string;
|
|
17
|
-
example: string;
|
|
18
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
// Parameter type schema
|
|
3
|
-
export const ParameterSchema = z.object({
|
|
4
|
-
parameter: z.string().optional().describe('Parameter type to get information about (time_zones, datums, units, tide_intervals, current_intervals, velocity_types, products, station_types, date_formats, output_formats). If not provided, returns information about all parameter types.')
|
|
5
|
-
});
|
package/dist/mcp-server.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NoaaService } from './noaa-service.js';
|
|
2
|
-
export declare class McpServer {
|
|
3
|
-
private tools;
|
|
4
|
-
private noaaService;
|
|
5
|
-
constructor(noaaService: NoaaService);
|
|
6
|
-
private initializeTools;
|
|
7
|
-
getTools(): {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
executeTool(toolName: string, params: any): Promise<any>;
|
|
12
|
-
}
|