@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipeworx/mcp-aviation-weather",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Aviation Weather MCP — METAR, TAF, PIREPs, AIRMET/SIGMET, station info",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
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.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
- case 'sigmet':
155
- return fetchAW('/airsigmet', { hazard: 'sigmet', format: String(args.format ?? 'json') });
156
- case 'airmet':
157
- return fetchAW('/airsigmet', { hazard: 'airmet', format: String(args.format ?? 'json') });
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);