@pipeworx/mcp-aviation-weather 0.1.1 → 0.1.2
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/package.json +1 -1
- package/server.json +1 -1
- package/src/index.ts +12 -4
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.pipeworx-io/aviation-weather",
|
|
4
4
|
"title": "Aviation Weather",
|
|
5
5
|
"description": "Aviation Weather MCP — METAR, TAF, PIREPs, AIRMET/SIGMET, station info",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.2",
|
|
7
7
|
"websiteUrl": "https://pipeworx.io/packs/aviation-weather",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/pipeworx-io/mcp-aviation-weather",
|
package/src/index.ts
CHANGED
|
@@ -151,10 +151,18 @@ async function callTool(name: string, args: Record<string, unknown>): Promise<un
|
|
|
151
151
|
}
|
|
152
152
|
return fetchAW('/pirep', params);
|
|
153
153
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
154
|
+
// The API's `hazard` param no longer accepts sigmet/airmet ("Invalid value
|
|
155
|
+
// for hazard" 400 — it means conv/turb/ice now), and server-side `type`
|
|
156
|
+
// filtering is unreliable. Fetch all air/sigmets and filter client-side on
|
|
157
|
+
// the airSigmetType field.
|
|
158
|
+
case 'sigmet': {
|
|
159
|
+
const all = await fetchAW('/airsigmet', { format: 'json' });
|
|
160
|
+
return Array.isArray(all) ? all.filter((x: Record<string, unknown>) => String(x.airSigmetType).toUpperCase() === 'SIGMET') : all;
|
|
161
|
+
}
|
|
162
|
+
case 'airmet': {
|
|
163
|
+
const all = await fetchAW('/airsigmet', { format: 'json' });
|
|
164
|
+
return Array.isArray(all) ? all.filter((x: Record<string, unknown>) => String(x.airSigmetType).toUpperCase() === 'AIRMET') : all;
|
|
165
|
+
}
|
|
158
166
|
case 'gairmet': {
|
|
159
167
|
const params: Record<string, string> = { format: String(args.format ?? 'json') };
|
|
160
168
|
if (args.type) params.type = String(args.type);
|