@squawk/mcp 0.10.0 → 0.11.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/README.md +18 -13
- package/dist/tools/fixes.d.ts.map +1 -1
- package/dist/tools/fixes.js +28 -0
- package/dist/tools/flightplan.d.ts.map +1 -1
- package/dist/tools/flightplan.js +68 -2
- package/dist/tools/navaids.d.ts.map +1 -1
- package/dist/tools/navaids.js +28 -0
- package/dist/tools/procedures.d.ts.map +1 -1
- package/dist/tools/procedures.js +38 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ version explicitly in the client config:
|
|
|
98
98
|
"mcpServers": {
|
|
99
99
|
"squawk": {
|
|
100
100
|
"command": "npx",
|
|
101
|
-
"args": ["-y", "@squawk/mcp@0.
|
|
101
|
+
"args": ["-y", "@squawk/mcp@0.11.0"]
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
}
|
|
@@ -164,7 +164,7 @@ Pinning works the same way:
|
|
|
164
164
|
"mcpServers": {
|
|
165
165
|
"squawk": {
|
|
166
166
|
"command": "npx",
|
|
167
|
-
"args": ["-y", "-p", "@squawk/icao-registry-data@0.8.10", "@squawk/mcp@0.
|
|
167
|
+
"args": ["-y", "-p", "@squawk/icao-registry-data@0.8.10", "@squawk/mcp@0.11.0"]
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -263,20 +263,22 @@ directly.
|
|
|
263
263
|
|
|
264
264
|
### Navaids (`@squawk/navaids` + `@squawk/navaid-data`)
|
|
265
265
|
|
|
266
|
-
| Tool
|
|
267
|
-
|
|
|
268
|
-
| `get_navaid_by_ident`
|
|
269
|
-
| `
|
|
270
|
-
| `
|
|
271
|
-
| `
|
|
266
|
+
| Tool | Purpose |
|
|
267
|
+
| --------------------------------- | -------------------------------------------------------- |
|
|
268
|
+
| `get_navaid_by_ident` | Look up navaids by identifier |
|
|
269
|
+
| `get_navaid_by_ident_at_position` | Look up the navaid sharing an identifier nearest a point |
|
|
270
|
+
| `find_navaids_by_frequency` | Find navaids tuned to a given MHz/kHz frequency |
|
|
271
|
+
| `find_nearest_navaids` | Find navaids nearest a position |
|
|
272
|
+
| `search_navaids` | Fuzzy search by name or identifier |
|
|
272
273
|
|
|
273
274
|
### Fixes (`@squawk/fixes` + `@squawk/fix-data`)
|
|
274
275
|
|
|
275
|
-
| Tool
|
|
276
|
-
|
|
|
277
|
-
| `get_fix_by_ident`
|
|
278
|
-
| `
|
|
279
|
-
| `
|
|
276
|
+
| Tool | Purpose |
|
|
277
|
+
| ------------------------------ | ----------------------------------------------------- |
|
|
278
|
+
| `get_fix_by_ident` | Look up fixes by identifier |
|
|
279
|
+
| `get_fix_by_ident_at_position` | Look up the fix sharing an identifier nearest a point |
|
|
280
|
+
| `find_nearest_fixes` | Find fixes nearest a position |
|
|
281
|
+
| `search_fixes` | Fuzzy search by identifier |
|
|
280
282
|
|
|
281
283
|
### Airways (`@squawk/airways` + `@squawk/airway-data`)
|
|
282
284
|
|
|
@@ -299,6 +301,7 @@ Covers SIDs, STARs, and Instrument Approach Procedures (IAPs) from FAA CIFP.
|
|
|
299
301
|
| `find_procedures_by_airport_and_runway` | Procedures at an airport serving a specific runway (IAP runway match or RW\* transition) |
|
|
300
302
|
| `find_approaches_by_type` | Every IAP of a given approach classification (ILS, RNAV, VOR, etc.) |
|
|
301
303
|
| `expand_procedure` | Expand a procedure into its leg sequence (with optional transition merge) |
|
|
304
|
+
| `get_procedure_geometry` | Ordered drawable fix points and a GeoJSON LineString for a procedure |
|
|
302
305
|
| `search_procedures` | Fuzzy search by name or identifier, optionally filtered by procedure or approach type |
|
|
303
306
|
|
|
304
307
|
### ICAO aircraft registry (`@squawk/icao-registry` + `@squawk/icao-registry-data`)
|
|
@@ -343,6 +346,8 @@ lookup so sessions that never need it do not pay the cost.
|
|
|
343
346
|
| ------------------------ | ---------------------------------------------------------- |
|
|
344
347
|
| `parse_flightplan_route` | Parse an ICAO Item 15 route into structured route elements |
|
|
345
348
|
| `compute_route_distance` | Total great-circle route distance with optional ETE |
|
|
349
|
+
| `get_route_geometry` | Ordered drawable points and a GeoJSON LineString |
|
|
350
|
+
| `get_route_timing` | Per-leg wind-corrected timing, ETE, and fuel/endurance |
|
|
346
351
|
|
|
347
352
|
### Flight computer (`@squawk/flight-math`)
|
|
348
353
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixes.d.ts","sourceRoot":"","sources":["../../src/tools/fixes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAoBzE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"fixes.d.ts","sourceRoot":"","sources":["../../src/tools/fixes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAoBzE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAwJxD"}
|
package/dist/tools/fixes.js
CHANGED
|
@@ -36,6 +36,34 @@ export function registerFixTools(server) {
|
|
|
36
36
|
structuredContent: { fixes },
|
|
37
37
|
};
|
|
38
38
|
});
|
|
39
|
+
server.registerTool('get_fix_by_ident_at_position', {
|
|
40
|
+
title: 'Get fix by identifier nearest a position',
|
|
41
|
+
description: 'Looks up the single US fix/waypoint sharing the given identifier that lies nearest to a geographic position. The same fix identifier can be published in more than one ICAO region; this disambiguates the collision by proximity to a known point such as a map-click location or an adjacent route waypoint. When toleranceNm is provided, matches farther than that distance are excluded and the result is null; when omitted, the nearest match wins regardless of distance. Returns null when no fix carries the identifier.',
|
|
42
|
+
inputSchema: {
|
|
43
|
+
ident: z.string().min(1).describe('Fix identifier (case-insensitive).'),
|
|
44
|
+
lat: z
|
|
45
|
+
.number()
|
|
46
|
+
.min(-90)
|
|
47
|
+
.max(90)
|
|
48
|
+
.describe('Latitude of the reference position in decimal degrees (WGS84).'),
|
|
49
|
+
lon: z
|
|
50
|
+
.number()
|
|
51
|
+
.min(-180)
|
|
52
|
+
.max(180)
|
|
53
|
+
.describe('Longitude of the reference position in decimal degrees (WGS84).'),
|
|
54
|
+
toleranceNm: z
|
|
55
|
+
.number()
|
|
56
|
+
.positive()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Maximum great-circle distance in nautical miles. Omit to let the nearest match win regardless of distance.'),
|
|
59
|
+
},
|
|
60
|
+
}, ({ ident, lat, lon, toleranceNm }) => {
|
|
61
|
+
const fix = fixResolver.byIdentAtPosition(ident, lat, lon, toleranceNm) ?? null;
|
|
62
|
+
return {
|
|
63
|
+
content: [{ type: 'text', text: JSON.stringify(fix, null, 2) }],
|
|
64
|
+
structuredContent: { fix },
|
|
65
|
+
};
|
|
66
|
+
});
|
|
39
67
|
server.registerTool('find_nearest_fixes', {
|
|
40
68
|
title: 'Find nearest fixes',
|
|
41
69
|
description: 'Finds US fixes/waypoints near a geographic position, sorted by great-circle distance in nautical miles.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flightplan.d.ts","sourceRoot":"","sources":["../../src/tools/flightplan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"flightplan.d.ts","sourceRoot":"","sources":["../../src/tools/flightplan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmBzE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgJ/D"}
|
package/dist/tools/flightplan.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* package's `resolvers` module.
|
|
7
7
|
*/
|
|
8
8
|
import { z } from 'zod';
|
|
9
|
-
import { computeRouteDistance, createFlightplanResolver } from '@squawk/flightplan';
|
|
9
|
+
import { computeRouteDistance, computeRouteTiming, createFlightplanResolver, extractRoutePoints, routeToLineString, } from '@squawk/flightplan';
|
|
10
10
|
import { airportResolver, airwayResolver, fixResolver, navaidResolver, procedureResolver, } from '../resolvers.js';
|
|
11
11
|
/**
|
|
12
12
|
* Registers flight plan parsing and route distance tools on the given MCP
|
|
@@ -41,7 +41,7 @@ export function registerFlightplanTools(server) {
|
|
|
41
41
|
});
|
|
42
42
|
server.registerTool('compute_route_distance', {
|
|
43
43
|
title: 'Compute route distance and ETE',
|
|
44
|
-
description: 'Parses a flight plan route string and computes the total great-circle distance in nautical miles, the ordered list of legs with cumulative distance, and (when groundSpeedKt is supplied) the estimated time enroute in hours. Uses FAA-published per-segment distances on airway segments when available; otherwise falls back to great-circle computation. Unresolved tokens are surfaced separately so the caller can decide whether to trust the total.',
|
|
44
|
+
description: 'Parses a flight plan route string and computes the total great-circle distance in nautical miles, the ordered list of legs with cumulative distance, and (when groundSpeedKt is supplied) the estimated time enroute in hours. Each leg carries the from/to point labels and their latitude/longitude in decimal degrees, so the result doubles as a drawable leg-by-leg geometry. Uses FAA-published per-segment distances on airway segments when available; otherwise falls back to great-circle computation. Unresolved tokens are surfaced separately so the caller can decide whether to trust the total. To get the route as a single ordered point sequence or a GeoJSON LineString for map rendering, use get_route_geometry instead.',
|
|
45
45
|
inputSchema: {
|
|
46
46
|
routeString: z
|
|
47
47
|
.string()
|
|
@@ -61,4 +61,70 @@ export function registerFlightplanTools(server) {
|
|
|
61
61
|
structuredContent: { result },
|
|
62
62
|
};
|
|
63
63
|
});
|
|
64
|
+
server.registerTool('get_route_geometry', {
|
|
65
|
+
title: 'Get drawable route geometry',
|
|
66
|
+
description: 'Parses a flight plan route string and returns its drawable geometry: the ordered sequence of geographic points (each with a label and latitude/longitude in decimal degrees) and a GeoJSON LineString ready to render as a polyline on a map. Airway and SID/STAR segments are expanded into their constituent fixes, and consecutive duplicate points (e.g. an airway entry fix that matches the preceding waypoint) are suppressed. LineString coordinates follow the GeoJSON [lon, lat] ordering. The lineString field is omitted when the route yields fewer than two drawable points, since a LineString requires at least two positions. Use compute_route_distance instead when you need leg distances or estimated time enroute.',
|
|
67
|
+
inputSchema: {
|
|
68
|
+
routeString: z
|
|
69
|
+
.string()
|
|
70
|
+
.min(1)
|
|
71
|
+
.describe('Whitespace-separated route string in ICAO Item 15 conventions.'),
|
|
72
|
+
},
|
|
73
|
+
}, ({ routeString }) => {
|
|
74
|
+
const route = resolver.parse(routeString);
|
|
75
|
+
const points = extractRoutePoints(route);
|
|
76
|
+
const lineString = routeToLineString(route);
|
|
77
|
+
const result = { points, lineString };
|
|
78
|
+
return {
|
|
79
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
80
|
+
structuredContent: result,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
server.registerTool('get_route_timing', {
|
|
84
|
+
title: 'Compute wind-corrected route timing',
|
|
85
|
+
description: 'Parses a flight plan route string and computes per-leg, wind-corrected timing. For each leg it solves the wind triangle from the leg true course, the given true airspeed, and a uniform wind, yielding true heading, wind correction angle, and ground speed, then estimated time enroute (and fuel burn when fuelBurnPerHr is given). Supply a uniform wind via the optional wind object (direction the wind blows FROM in degrees true, and speed in knots) applied to every leg; omit it to time the route as calm, where ground speed equals true airspeed. When fuelBurnPerHr and fuelAvailable are both given, the result also reports endurance in hours and whether fuel is sufficient for the total time enroute. A leg whose ground speed is not positive (a pure headwind equal to true airspeed) is left untimed, which makes the route ETE and fuel totals null. Use compute_route_distance for plain distance or a single constant-ground-speed ETE without wind correction.',
|
|
86
|
+
inputSchema: {
|
|
87
|
+
routeString: z
|
|
88
|
+
.string()
|
|
89
|
+
.min(1)
|
|
90
|
+
.describe('Whitespace-separated route string in ICAO Item 15 conventions.'),
|
|
91
|
+
trueAirspeedKt: z
|
|
92
|
+
.number()
|
|
93
|
+
.positive()
|
|
94
|
+
.describe('True airspeed in knots flown on every leg.'),
|
|
95
|
+
wind: z
|
|
96
|
+
.object({
|
|
97
|
+
directionDeg: z
|
|
98
|
+
.number()
|
|
99
|
+
.min(0)
|
|
100
|
+
.max(360)
|
|
101
|
+
.describe('Direction the wind blows FROM in degrees true (0-360).'),
|
|
102
|
+
speedKt: z.number().nonnegative().describe('Wind speed in knots.'),
|
|
103
|
+
})
|
|
104
|
+
.optional()
|
|
105
|
+
.describe('Uniform wind applied to every leg. Omit to time the route as calm (ground speed equals true airspeed).'),
|
|
106
|
+
fuelBurnPerHr: z
|
|
107
|
+
.number()
|
|
108
|
+
.positive()
|
|
109
|
+
.optional()
|
|
110
|
+
.describe('Optional fuel burn rate per hour in any consistent unit. When given, per-leg and total fuel are computed.'),
|
|
111
|
+
fuelAvailable: z
|
|
112
|
+
.number()
|
|
113
|
+
.positive()
|
|
114
|
+
.optional()
|
|
115
|
+
.describe('Optional fuel on board in the same unit as fuelBurnPerHr. With the burn rate, enables endurance and fuel-sufficiency reporting.'),
|
|
116
|
+
},
|
|
117
|
+
}, ({ routeString, trueAirspeedKt, wind, fuelBurnPerHr, fuelAvailable }) => {
|
|
118
|
+
const route = resolver.parse(routeString);
|
|
119
|
+
const result = computeRouteTiming(route, {
|
|
120
|
+
trueAirspeedKt,
|
|
121
|
+
...(wind !== undefined ? { windProvider: () => wind } : {}),
|
|
122
|
+
...(fuelBurnPerHr !== undefined ? { fuelBurnPerHr } : {}),
|
|
123
|
+
...(fuelAvailable !== undefined ? { fuelAvailable } : {}),
|
|
124
|
+
});
|
|
125
|
+
return {
|
|
126
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
127
|
+
structuredContent: { result },
|
|
128
|
+
};
|
|
129
|
+
});
|
|
64
130
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navaids.d.ts","sourceRoot":"","sources":["../../src/tools/navaids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"navaids.d.ts","sourceRoot":"","sources":["../../src/tools/navaids.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA6L3D"}
|
package/dist/tools/navaids.js
CHANGED
|
@@ -38,6 +38,34 @@ export function registerNavaidTools(server) {
|
|
|
38
38
|
structuredContent: { navaids },
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
+
server.registerTool('get_navaid_by_ident_at_position', {
|
|
42
|
+
title: 'Get navaid by identifier nearest a position',
|
|
43
|
+
description: 'Looks up the single US navaid sharing the given identifier that lies nearest to a geographic position. Multiple navaids can publish the same identifier (a co-located NDB and VOR/DME, or two distant stations reusing a code); this disambiguates them by proximity to a known point such as a map-click location or an adjacent route waypoint. When toleranceNm is provided, matches farther than that distance are excluded and the result is null; when omitted, the nearest match wins regardless of distance. Returns null when no navaid carries the identifier.',
|
|
44
|
+
inputSchema: {
|
|
45
|
+
ident: z.string().min(1).describe('Navaid identifier (case-insensitive).'),
|
|
46
|
+
lat: z
|
|
47
|
+
.number()
|
|
48
|
+
.min(-90)
|
|
49
|
+
.max(90)
|
|
50
|
+
.describe('Latitude of the reference position in decimal degrees (WGS84).'),
|
|
51
|
+
lon: z
|
|
52
|
+
.number()
|
|
53
|
+
.min(-180)
|
|
54
|
+
.max(180)
|
|
55
|
+
.describe('Longitude of the reference position in decimal degrees (WGS84).'),
|
|
56
|
+
toleranceNm: z
|
|
57
|
+
.number()
|
|
58
|
+
.positive()
|
|
59
|
+
.optional()
|
|
60
|
+
.describe('Maximum great-circle distance in nautical miles. Omit to let the nearest match win regardless of distance.'),
|
|
61
|
+
},
|
|
62
|
+
}, ({ ident, lat, lon, toleranceNm }) => {
|
|
63
|
+
const navaid = navaidResolver.byIdentAtPosition(ident, lat, lon, toleranceNm) ?? null;
|
|
64
|
+
return {
|
|
65
|
+
content: [{ type: 'text', text: JSON.stringify(navaid, null, 2) }],
|
|
66
|
+
structuredContent: { navaid },
|
|
67
|
+
};
|
|
68
|
+
});
|
|
41
69
|
server.registerTool('find_navaids_by_frequency', {
|
|
42
70
|
title: 'Find navaids by frequency',
|
|
43
71
|
description: 'Finds US navaids tuned to a given frequency. VOR-family navaids (VOR, VORTAC, VOR/DME, TACAN, DME, VOT) use MHz; NDB-family navaids (NDB, NDB/DME, MARINE_NDB) use kHz. Filter by navaid types when needed to disambiguate the unit.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../../src/tools/procedures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"procedures.d.ts","sourceRoot":"","sources":["../../src/tools/procedures.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAiCzE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgQ9D"}
|
package/dist/tools/procedures.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* `@squawk/procedure-data`.
|
|
6
6
|
*/
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
+
import { expansionToLineString, extractLegPoints } from '@squawk/procedures';
|
|
8
9
|
import { procedureResolver } from '../resolvers.js';
|
|
9
10
|
/** All {@link ProcedureType} values, used for input validation. */
|
|
10
11
|
const PROCEDURE_TYPE_VALUES = ['SID', 'STAR', 'IAP'];
|
|
@@ -127,7 +128,7 @@ export function registerProcedureTools(server) {
|
|
|
127
128
|
});
|
|
128
129
|
server.registerTool('expand_procedure', {
|
|
129
130
|
title: 'Expand a procedure into an ordered leg sequence',
|
|
130
|
-
description: "Expands a procedure at an airport into an ordered leg sequence. Without a transition name, returns the procedure's common route. With a transition name, merges the named transition's legs with the common route in flying order (SID: common then transition for enroute exits, transition then common for runway transitions; STAR: transition then common for enroute entries; IAP: approach transition then final approach segment). Returns null when the airport, procedure, or transition is not found.",
|
|
131
|
+
description: "Expands a procedure at an airport into an ordered leg sequence. Without a transition name, returns the procedure's common route. With a transition name, merges the named transition's legs with the common route in flying order (SID: common then transition for enroute exits, transition then common for runway transitions; STAR: transition then common for enroute entries; IAP: approach transition then final approach segment). Returns null when the airport, procedure, or transition is not found. To get just the drawable point sequence or a GeoJSON LineString for map rendering, use get_procedure_geometry instead.",
|
|
131
132
|
inputSchema: {
|
|
132
133
|
airportId: z.string().min(1).describe('Airport identifier (case-insensitive).'),
|
|
133
134
|
identifier: z.string().min(1).describe('CIFP procedure identifier (case-insensitive).'),
|
|
@@ -155,6 +156,42 @@ export function registerProcedureTools(server) {
|
|
|
155
156
|
structuredContent: { expansion },
|
|
156
157
|
};
|
|
157
158
|
});
|
|
159
|
+
server.registerTool('get_procedure_geometry', {
|
|
160
|
+
title: 'Get drawable procedure geometry',
|
|
161
|
+
description: 'Expands a procedure at an airport (optionally merging a named transition, exactly like expand_procedure) and returns its drawable geometry: the ordered sequence of fix points (each with a label and latitude/longitude in decimal degrees) and a GeoJSON LineString ready to render as a polyline on a map. Only legs that terminate at a known fix contribute a point; ARINC 424 legs that end at an altitude, DME distance, radial, intercept, or manual event (CA, FA, VA, CD, FD, VD, CR, VR, CI, VI, FM, VM, and the HA/HM holds) carry no coordinate and are skipped, so the line breaks across them and is an approximation rather than a precise flyable track. Consecutive duplicate points are suppressed. LineString coordinates follow the GeoJSON [lon, lat] ordering. The lineString field is omitted when fewer than two fix points are drawable. Returns null when the airport, procedure, or transition is not found. Use expand_procedure instead when you need the full leg fields (constraints, courses, path terminators) rather than just geometry.',
|
|
162
|
+
inputSchema: {
|
|
163
|
+
airportId: z
|
|
164
|
+
.string()
|
|
165
|
+
.min(1)
|
|
166
|
+
.describe('Airport identifier (ICAO or FAA, case-insensitive).'),
|
|
167
|
+
identifier: z.string().min(1).describe('CIFP procedure identifier (case-insensitive).'),
|
|
168
|
+
transitionName: z
|
|
169
|
+
.string()
|
|
170
|
+
.min(1)
|
|
171
|
+
.optional()
|
|
172
|
+
.describe('Optional transition name. Omit to use just the common route.'),
|
|
173
|
+
},
|
|
174
|
+
}, ({ airportId, identifier, transitionName }) => {
|
|
175
|
+
const expansion = procedureResolver.expand(airportId, identifier, transitionName);
|
|
176
|
+
if (expansion === undefined) {
|
|
177
|
+
return {
|
|
178
|
+
content: [
|
|
179
|
+
{
|
|
180
|
+
type: 'text',
|
|
181
|
+
text: `Could not expand procedure "${identifier}" at "${airportId}"${transitionName ? ` with transition "${transitionName}"` : ''}.`,
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
structuredContent: { points: null, lineString: null },
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
const points = extractLegPoints(expansion.legs);
|
|
188
|
+
const lineString = expansionToLineString(expansion.legs);
|
|
189
|
+
const result = { points, lineString };
|
|
190
|
+
return {
|
|
191
|
+
content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
|
|
192
|
+
structuredContent: result,
|
|
193
|
+
};
|
|
194
|
+
});
|
|
158
195
|
server.registerTool('search_procedures', {
|
|
159
196
|
title: 'Search procedures by name or identifier',
|
|
160
197
|
description: 'Fuzzy-searches US instrument procedures (SIDs, STARs, IAPs) across identifier and name. Matching is case-insensitive and tolerant of prefixes, substrings, subsequences, and small typos. Each result carries a match score in [0, 1] (1 is an exact match) and the matched field; results are returned best-match first.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squawk/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Model Context Protocol server exposing squawk's aviation libraries as tools for LLM clients",
|
|
6
6
|
"author": "Neil Cochran",
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
"@squawk/airway-data": "^0.5.3",
|
|
49
49
|
"@squawk/airways": "^0.5.0",
|
|
50
50
|
"@squawk/fix-data": "^0.6.3",
|
|
51
|
-
"@squawk/fixes": "^0.
|
|
51
|
+
"@squawk/fixes": "^0.5.0",
|
|
52
52
|
"@squawk/flight-math": "^0.5.3",
|
|
53
|
-
"@squawk/flightplan": "^0.
|
|
53
|
+
"@squawk/flightplan": "^0.6.0",
|
|
54
54
|
"@squawk/geo": "^0.4.3",
|
|
55
55
|
"@squawk/icao-registry": "^0.5.1",
|
|
56
56
|
"@squawk/navaid-data": "^0.6.3",
|
|
57
|
-
"@squawk/navaids": "^0.
|
|
57
|
+
"@squawk/navaids": "^0.6.0",
|
|
58
58
|
"@squawk/notams": "^0.3.5",
|
|
59
59
|
"@squawk/procedure-data": "^0.7.2",
|
|
60
|
-
"@squawk/procedures": "^0.
|
|
60
|
+
"@squawk/procedures": "^0.7.0",
|
|
61
61
|
"@squawk/types": "^0.8.0",
|
|
62
|
-
"@squawk/weather": "^0.
|
|
62
|
+
"@squawk/weather": "^0.6.0",
|
|
63
63
|
"zod": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|