@squawk/mcp 0.9.6 → 0.10.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 +12 -11
- package/dist/tools/airports.d.ts.map +1 -1
- package/dist/tools/airports.js +15 -3
- package/dist/tools/airspace.d.ts.map +1 -1
- package/dist/tools/airspace.js +47 -0
- package/dist/tools/airways.d.ts.map +1 -1
- package/dist/tools/airways.js +15 -3
- package/dist/tools/fixes.d.ts.map +1 -1
- package/dist/tools/fixes.js +15 -3
- package/dist/tools/navaids.d.ts.map +1 -1
- package/dist/tools/navaids.js +15 -3
- package/dist/tools/procedures.d.ts.map +1 -1
- package/dist/tools/procedures.js +12 -3
- package/package.json +7 -7
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.10.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.10.0"]
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
}
|
|
@@ -249,7 +249,7 @@ directly.
|
|
|
249
249
|
| `get_airport_by_faa_id` | Look up an airport by FAA identifier |
|
|
250
250
|
| `get_airport_by_icao` | Look up an airport by ICAO code |
|
|
251
251
|
| `find_nearest_airports` | Find airports nearest a position with optional facility-type and runway-length filters |
|
|
252
|
-
| `search_airports` |
|
|
252
|
+
| `search_airports` | Fuzzy search by FAA identifier, name, or city |
|
|
253
253
|
|
|
254
254
|
### Airspace (`@squawk/airspace` + `@squawk/airspace-data`)
|
|
255
255
|
|
|
@@ -259,6 +259,7 @@ directly.
|
|
|
259
259
|
| `get_airspace_for_airport` | Class B/C/D/E2 surface-area sectors associated with an airport, with full polygon boundaries |
|
|
260
260
|
| `find_artcc_for_position` | US ARTCC features containing a given position and altitude (typically one feature; multiple for oceanic CTA+FIR overlaps or stratum boundaries) |
|
|
261
261
|
| `find_artcc_by_identifier` | All ARTCC features for a 3-letter center code (e.g. "ZNY"), optionally narrowed to a single stratum, with full polygon boundaries |
|
|
262
|
+
| `search_airspace` | Fuzzy search by identifier or name (boundary summarized as a vertex count) |
|
|
262
263
|
|
|
263
264
|
### Navaids (`@squawk/navaids` + `@squawk/navaid-data`)
|
|
264
265
|
|
|
@@ -267,15 +268,15 @@ directly.
|
|
|
267
268
|
| `get_navaid_by_ident` | Look up navaids by identifier |
|
|
268
269
|
| `find_navaids_by_frequency` | Find navaids tuned to a given MHz/kHz frequency |
|
|
269
270
|
| `find_nearest_navaids` | Find navaids nearest a position |
|
|
270
|
-
| `search_navaids` |
|
|
271
|
+
| `search_navaids` | Fuzzy search by name or identifier |
|
|
271
272
|
|
|
272
273
|
### Fixes (`@squawk/fixes` + `@squawk/fix-data`)
|
|
273
274
|
|
|
274
|
-
| Tool | Purpose
|
|
275
|
-
| -------------------- |
|
|
276
|
-
| `get_fix_by_ident` | Look up fixes by identifier
|
|
277
|
-
| `find_nearest_fixes` | Find fixes nearest a position
|
|
278
|
-
| `search_fixes` |
|
|
275
|
+
| Tool | Purpose |
|
|
276
|
+
| -------------------- | ----------------------------- |
|
|
277
|
+
| `get_fix_by_ident` | Look up fixes by identifier |
|
|
278
|
+
| `find_nearest_fixes` | Find fixes nearest a position |
|
|
279
|
+
| `search_fixes` | Fuzzy search by identifier |
|
|
279
280
|
|
|
280
281
|
### Airways (`@squawk/airways` + `@squawk/airway-data`)
|
|
281
282
|
|
|
@@ -284,7 +285,7 @@ directly.
|
|
|
284
285
|
| `get_airway_by_designation` | Look up airways by designation |
|
|
285
286
|
| `expand_airway_segment` | Expand an airway between an entry fix and an exit fix |
|
|
286
287
|
| `find_airways_by_fix` | Reverse lookup: airways that pass through a given fix |
|
|
287
|
-
| `search_airways` |
|
|
288
|
+
| `search_airways` | Fuzzy search by designation |
|
|
288
289
|
|
|
289
290
|
### Procedures (`@squawk/procedures` + `@squawk/procedure-data`)
|
|
290
291
|
|
|
@@ -298,7 +299,7 @@ Covers SIDs, STARs, and Instrument Approach Procedures (IAPs) from FAA CIFP.
|
|
|
298
299
|
| `find_procedures_by_airport_and_runway` | Procedures at an airport serving a specific runway (IAP runway match or RW\* transition) |
|
|
299
300
|
| `find_approaches_by_type` | Every IAP of a given approach classification (ILS, RNAV, VOR, etc.) |
|
|
300
301
|
| `expand_procedure` | Expand a procedure into its leg sequence (with optional transition merge) |
|
|
301
|
-
| `search_procedures` |
|
|
302
|
+
| `search_procedures` | Fuzzy search by name or identifier, optionally filtered by procedure or approach type |
|
|
302
303
|
|
|
303
304
|
### ICAO aircraft registry (`@squawk/icao-registry` + `@squawk/icao-registry-data`)
|
|
304
305
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"airports.d.ts","sourceRoot":"","sources":["../../src/tools/airports.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkBzE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"airports.d.ts","sourceRoot":"","sources":["../../src/tools/airports.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAkBzE;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2J5D"}
|
package/dist/tools/airports.js
CHANGED
|
@@ -111,9 +111,12 @@ export function registerAirportTools(server) {
|
|
|
111
111
|
});
|
|
112
112
|
server.registerTool('search_airports', {
|
|
113
113
|
title: 'Search airports by name or city',
|
|
114
|
-
description: '
|
|
114
|
+
description: 'Fuzzy-searches US airports across FAA identifier, name, and city. 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. Use this when the user knows a partial name but not the identifier.',
|
|
115
115
|
inputSchema: {
|
|
116
|
-
text: z
|
|
116
|
+
text: z
|
|
117
|
+
.string()
|
|
118
|
+
.min(1)
|
|
119
|
+
.describe('Search text, fuzzily matched against airport FAA identifier, name, and city.'),
|
|
117
120
|
limit: z
|
|
118
121
|
.number()
|
|
119
122
|
.int()
|
|
@@ -124,8 +127,14 @@ export function registerAirportTools(server) {
|
|
|
124
127
|
.array(z.enum(FACILITY_TYPE_VALUES))
|
|
125
128
|
.optional()
|
|
126
129
|
.describe('Restrict results to these facility types. Omit to include all types.'),
|
|
130
|
+
minScore: z
|
|
131
|
+
.number()
|
|
132
|
+
.min(0)
|
|
133
|
+
.max(1)
|
|
134
|
+
.optional()
|
|
135
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
127
136
|
},
|
|
128
|
-
}, ({ text, limit, facilityTypes }) => {
|
|
137
|
+
}, ({ text, limit, facilityTypes, minScore }) => {
|
|
129
138
|
const query = { text };
|
|
130
139
|
if (limit !== undefined) {
|
|
131
140
|
query.limit = limit;
|
|
@@ -133,6 +142,9 @@ export function registerAirportTools(server) {
|
|
|
133
142
|
if (facilityTypes !== undefined) {
|
|
134
143
|
query.types = new Set(facilityTypes);
|
|
135
144
|
}
|
|
145
|
+
if (minScore !== undefined) {
|
|
146
|
+
query.minScore = minScore;
|
|
147
|
+
}
|
|
136
148
|
const results = resolver.search(query);
|
|
137
149
|
return {
|
|
138
150
|
content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"airspace.d.ts","sourceRoot":"","sources":["../../src/tools/airspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmFzE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"airspace.d.ts","sourceRoot":"","sources":["../../src/tools/airspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAmFzE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA0L7D"}
|
package/dist/tools/airspace.js
CHANGED
|
@@ -165,4 +165,51 @@ export function registerAirspaceTools(server) {
|
|
|
165
165
|
structuredContent: { features },
|
|
166
166
|
};
|
|
167
167
|
});
|
|
168
|
+
server.registerTool('search_airspace', {
|
|
169
|
+
title: 'Search airspace by name or identifier',
|
|
170
|
+
description: 'Fuzzy-searches US airspace features 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. Boundary geometry is summarized as a vertex count to keep responses compact.',
|
|
171
|
+
inputSchema: {
|
|
172
|
+
text: z
|
|
173
|
+
.string()
|
|
174
|
+
.min(1)
|
|
175
|
+
.describe('Search text, fuzzily matched against airspace identifier and name.'),
|
|
176
|
+
airspaceTypes: z
|
|
177
|
+
.array(z.enum(AIRSPACE_TYPE_VALUES))
|
|
178
|
+
.optional()
|
|
179
|
+
.describe('Restrict results to these airspace types. Omit to include all types.'),
|
|
180
|
+
limit: z
|
|
181
|
+
.number()
|
|
182
|
+
.int()
|
|
183
|
+
.positive()
|
|
184
|
+
.optional()
|
|
185
|
+
.describe('Maximum number of results to return. Defaults to 20.'),
|
|
186
|
+
minScore: z
|
|
187
|
+
.number()
|
|
188
|
+
.min(0)
|
|
189
|
+
.max(1)
|
|
190
|
+
.optional()
|
|
191
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
192
|
+
},
|
|
193
|
+
}, ({ text, airspaceTypes, limit, minScore }) => {
|
|
194
|
+
const query = { text };
|
|
195
|
+
if (airspaceTypes !== undefined) {
|
|
196
|
+
query.types = new Set(airspaceTypes);
|
|
197
|
+
}
|
|
198
|
+
if (limit !== undefined) {
|
|
199
|
+
query.limit = limit;
|
|
200
|
+
}
|
|
201
|
+
if (minScore !== undefined) {
|
|
202
|
+
query.minScore = minScore;
|
|
203
|
+
}
|
|
204
|
+
const results = airspaceResolver.search(query).map((result) => ({
|
|
205
|
+
feature: summarizeFeature(result.feature),
|
|
206
|
+
score: result.score,
|
|
207
|
+
matchedField: result.matchedField,
|
|
208
|
+
ranges: result.ranges,
|
|
209
|
+
}));
|
|
210
|
+
return {
|
|
211
|
+
content: [{ type: 'text', text: JSON.stringify({ results }, null, 2) }],
|
|
212
|
+
structuredContent: { results },
|
|
213
|
+
};
|
|
214
|
+
});
|
|
168
215
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"airways.d.ts","sourceRoot":"","sources":["../../src/tools/airways.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"airways.d.ts","sourceRoot":"","sources":["../../src/tools/airways.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwBzE;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2H3D"}
|
package/dist/tools/airways.js
CHANGED
|
@@ -84,9 +84,12 @@ export function registerAirwayTools(server) {
|
|
|
84
84
|
});
|
|
85
85
|
server.registerTool('search_airways', {
|
|
86
86
|
title: 'Search airways by designation',
|
|
87
|
-
description: '
|
|
87
|
+
description: 'Fuzzy-searches US airways by designation. 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); results are returned best-match first.',
|
|
88
88
|
inputSchema: {
|
|
89
|
-
text: z
|
|
89
|
+
text: z
|
|
90
|
+
.string()
|
|
91
|
+
.min(1)
|
|
92
|
+
.describe('Search text, fuzzily matched against the airway designation.'),
|
|
90
93
|
airwayTypes: z
|
|
91
94
|
.array(z.enum(AIRWAY_TYPE_VALUES))
|
|
92
95
|
.optional()
|
|
@@ -97,8 +100,14 @@ export function registerAirwayTools(server) {
|
|
|
97
100
|
.positive()
|
|
98
101
|
.optional()
|
|
99
102
|
.describe('Maximum number of results to return. Defaults to 20.'),
|
|
103
|
+
minScore: z
|
|
104
|
+
.number()
|
|
105
|
+
.min(0)
|
|
106
|
+
.max(1)
|
|
107
|
+
.optional()
|
|
108
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
100
109
|
},
|
|
101
|
-
}, ({ text, airwayTypes, limit }) => {
|
|
110
|
+
}, ({ text, airwayTypes, limit, minScore }) => {
|
|
102
111
|
const query = { text };
|
|
103
112
|
if (airwayTypes !== undefined) {
|
|
104
113
|
query.types = new Set(airwayTypes);
|
|
@@ -106,6 +115,9 @@ export function registerAirwayTools(server) {
|
|
|
106
115
|
if (limit !== undefined) {
|
|
107
116
|
query.limit = limit;
|
|
108
117
|
}
|
|
118
|
+
if (minScore !== undefined) {
|
|
119
|
+
query.minScore = minScore;
|
|
120
|
+
}
|
|
109
121
|
const airways = airwayResolver.search(query);
|
|
110
122
|
return {
|
|
111
123
|
content: [{ type: 'text', text: JSON.stringify(airways, null, 2) }],
|
|
@@ -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,CAoHxD"}
|
package/dist/tools/fixes.js
CHANGED
|
@@ -77,9 +77,12 @@ export function registerFixTools(server) {
|
|
|
77
77
|
});
|
|
78
78
|
server.registerTool('search_fixes', {
|
|
79
79
|
title: 'Search fixes by identifier',
|
|
80
|
-
description: '
|
|
80
|
+
description: 'Fuzzy-searches US fixes/waypoints by identifier. 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); results are returned best-match first.',
|
|
81
81
|
inputSchema: {
|
|
82
|
-
text: z
|
|
82
|
+
text: z
|
|
83
|
+
.string()
|
|
84
|
+
.min(1)
|
|
85
|
+
.describe('Search text, fuzzily matched against the fix identifier.'),
|
|
83
86
|
useCodes: z
|
|
84
87
|
.array(z.enum(FIX_USE_CODE_VALUES))
|
|
85
88
|
.optional()
|
|
@@ -90,8 +93,14 @@ export function registerFixTools(server) {
|
|
|
90
93
|
.positive()
|
|
91
94
|
.optional()
|
|
92
95
|
.describe('Maximum number of results to return. Defaults to 20.'),
|
|
96
|
+
minScore: z
|
|
97
|
+
.number()
|
|
98
|
+
.min(0)
|
|
99
|
+
.max(1)
|
|
100
|
+
.optional()
|
|
101
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
93
102
|
},
|
|
94
|
-
}, ({ text, useCodes, limit }) => {
|
|
103
|
+
}, ({ text, useCodes, limit, minScore }) => {
|
|
95
104
|
const query = { text };
|
|
96
105
|
if (useCodes !== undefined) {
|
|
97
106
|
query.useCodes = new Set(useCodes);
|
|
@@ -99,6 +108,9 @@ export function registerFixTools(server) {
|
|
|
99
108
|
if (limit !== undefined) {
|
|
100
109
|
query.limit = limit;
|
|
101
110
|
}
|
|
111
|
+
if (minScore !== undefined) {
|
|
112
|
+
query.minScore = minScore;
|
|
113
|
+
}
|
|
102
114
|
const fixes = fixResolver.search(query);
|
|
103
115
|
return {
|
|
104
116
|
content: [{ type: 'text', text: JSON.stringify(fixes, null, 2) }],
|
|
@@ -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,CAyJ3D"}
|
package/dist/tools/navaids.js
CHANGED
|
@@ -112,9 +112,12 @@ export function registerNavaidTools(server) {
|
|
|
112
112
|
});
|
|
113
113
|
server.registerTool('search_navaids', {
|
|
114
114
|
title: 'Search navaids by name or identifier',
|
|
115
|
-
description: '
|
|
115
|
+
description: 'Fuzzy-searches US navaids 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.',
|
|
116
116
|
inputSchema: {
|
|
117
|
-
text: z
|
|
117
|
+
text: z
|
|
118
|
+
.string()
|
|
119
|
+
.min(1)
|
|
120
|
+
.describe('Search text, fuzzily matched against navaid identifier and name.'),
|
|
118
121
|
navaidTypes: z
|
|
119
122
|
.array(z.enum(NAVAID_TYPE_VALUES))
|
|
120
123
|
.optional()
|
|
@@ -125,8 +128,14 @@ export function registerNavaidTools(server) {
|
|
|
125
128
|
.positive()
|
|
126
129
|
.optional()
|
|
127
130
|
.describe('Maximum number of results to return. Defaults to 20.'),
|
|
131
|
+
minScore: z
|
|
132
|
+
.number()
|
|
133
|
+
.min(0)
|
|
134
|
+
.max(1)
|
|
135
|
+
.optional()
|
|
136
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
128
137
|
},
|
|
129
|
-
}, ({ text, navaidTypes, limit }) => {
|
|
138
|
+
}, ({ text, navaidTypes, limit, minScore }) => {
|
|
130
139
|
const query = { text };
|
|
131
140
|
if (navaidTypes !== undefined) {
|
|
132
141
|
query.types = new Set(navaidTypes);
|
|
@@ -134,6 +143,9 @@ export function registerNavaidTools(server) {
|
|
|
134
143
|
if (limit !== undefined) {
|
|
135
144
|
query.limit = limit;
|
|
136
145
|
}
|
|
146
|
+
if (minScore !== undefined) {
|
|
147
|
+
query.minScore = minScore;
|
|
148
|
+
}
|
|
137
149
|
const navaids = navaidResolver.search(query);
|
|
138
150
|
return {
|
|
139
151
|
content: [{ type: 'text', text: JSON.stringify(navaids, null, 2) }],
|
|
@@ -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;AAgCzE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
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;AAgCzE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsN9D"}
|
package/dist/tools/procedures.js
CHANGED
|
@@ -157,12 +157,12 @@ export function registerProcedureTools(server) {
|
|
|
157
157
|
});
|
|
158
158
|
server.registerTool('search_procedures', {
|
|
159
159
|
title: 'Search procedures by name or identifier',
|
|
160
|
-
description: '
|
|
160
|
+
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.',
|
|
161
161
|
inputSchema: {
|
|
162
162
|
text: z
|
|
163
163
|
.string()
|
|
164
164
|
.min(1)
|
|
165
|
-
.describe('
|
|
165
|
+
.describe('Search text, fuzzily matched against the procedure identifier and name.'),
|
|
166
166
|
procedureType: z
|
|
167
167
|
.enum(PROCEDURE_TYPE_VALUES)
|
|
168
168
|
.optional()
|
|
@@ -177,8 +177,14 @@ export function registerProcedureTools(server) {
|
|
|
177
177
|
.positive()
|
|
178
178
|
.optional()
|
|
179
179
|
.describe('Maximum number of results to return. Defaults to 20.'),
|
|
180
|
+
minScore: z
|
|
181
|
+
.number()
|
|
182
|
+
.min(0)
|
|
183
|
+
.max(1)
|
|
184
|
+
.optional()
|
|
185
|
+
.describe('Minimum match score (exclusive) in [0, 1] a result must reach. Defaults to 0. Raise it to drop weak fuzzy matches.'),
|
|
180
186
|
},
|
|
181
|
-
}, ({ text, procedureType, approachType, limit }) => {
|
|
187
|
+
}, ({ text, procedureType, approachType, limit, minScore }) => {
|
|
182
188
|
const query = { text };
|
|
183
189
|
if (procedureType !== undefined) {
|
|
184
190
|
query.type = procedureType;
|
|
@@ -189,6 +195,9 @@ export function registerProcedureTools(server) {
|
|
|
189
195
|
if (limit !== undefined) {
|
|
190
196
|
query.limit = limit;
|
|
191
197
|
}
|
|
198
|
+
if (minScore !== undefined) {
|
|
199
|
+
query.minScore = minScore;
|
|
200
|
+
}
|
|
192
201
|
const procedures = procedureResolver.search(query);
|
|
193
202
|
return {
|
|
194
203
|
content: [{ type: 'text', text: JSON.stringify(procedures, null, 2) }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squawk/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.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",
|
|
@@ -42,22 +42,22 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
44
44
|
"@squawk/airport-data": "^0.7.3",
|
|
45
|
-
"@squawk/airports": "^0.
|
|
46
|
-
"@squawk/airspace": "^0.
|
|
45
|
+
"@squawk/airports": "^0.7.0",
|
|
46
|
+
"@squawk/airspace": "^0.9.0",
|
|
47
47
|
"@squawk/airspace-data": "^0.5.2",
|
|
48
48
|
"@squawk/airway-data": "^0.5.3",
|
|
49
|
-
"@squawk/airways": "^0.
|
|
49
|
+
"@squawk/airways": "^0.5.0",
|
|
50
50
|
"@squawk/fix-data": "^0.6.3",
|
|
51
|
-
"@squawk/fixes": "^0.
|
|
51
|
+
"@squawk/fixes": "^0.4.0",
|
|
52
52
|
"@squawk/flight-math": "^0.5.3",
|
|
53
53
|
"@squawk/flightplan": "^0.5.1",
|
|
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.5.0",
|
|
58
58
|
"@squawk/notams": "^0.3.5",
|
|
59
59
|
"@squawk/procedure-data": "^0.7.2",
|
|
60
|
-
"@squawk/procedures": "^0.
|
|
60
|
+
"@squawk/procedures": "^0.6.0",
|
|
61
61
|
"@squawk/types": "^0.8.0",
|
|
62
62
|
"@squawk/weather": "^0.5.5",
|
|
63
63
|
"zod": "^4.4.3"
|