@squawk/mcp 0.7.0 → 0.8.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 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.7.0"]
101
+ "args": ["-y", "@squawk/mcp@0.8.0"]
102
102
  }
103
103
  }
104
104
  }
@@ -209,9 +209,12 @@ directly.
209
209
 
210
210
  ### Airspace (`@squawk/airspace` + `@squawk/airspace-data`)
211
211
 
212
- | Tool | Purpose |
213
- | ---------------------------- | --------------------------------------------------------------------------------------------------- |
214
- | `query_airspace_at_position` | Class B/C/D/E and SUA features whose lateral polygon and vertical bounds contain a point + altitude |
212
+ | Tool | Purpose |
213
+ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
214
+ | `query_airspace_at_position` | Class B/C/D/E, SUA, and ARTCC features whose lateral polygon and vertical bounds contain a point + altitude |
215
+ | `get_airspace_for_airport` | Class B/C/D/E2 surface-area sectors associated with an airport, with full polygon boundaries |
216
+ | `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) |
217
+ | `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 |
215
218
 
216
219
  ### Navaids (`@squawk/navaids` + `@squawk/navaid-data`)
217
220
 
@@ -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;AAmEzE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsE7D"}
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;AAiFzE;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAmI7D"}
@@ -23,6 +23,16 @@ const AIRSPACE_TYPE_VALUES = [
23
23
  'WARNING',
24
24
  'ALERT',
25
25
  'NSA',
26
+ 'ARTCC',
27
+ ];
28
+ /** All {@link ArtccStratum} values, used for input validation. */
29
+ const ARTCC_STRATUM_VALUES = [
30
+ 'LOW',
31
+ 'HIGH',
32
+ 'UTA',
33
+ 'CTA',
34
+ 'FIR',
35
+ 'CTA/FIR',
26
36
  ];
27
37
  /**
28
38
  * Strips the polygon boundary from a feature for tool output. The boundary
@@ -43,6 +53,7 @@ function summarizeFeature(feature) {
43
53
  state: feature.state,
44
54
  controllingFacility: feature.controllingFacility,
45
55
  scheduleDescription: feature.scheduleDescription,
56
+ artccStratum: feature.artccStratum,
46
57
  vertexCount: ring.length,
47
58
  };
48
59
  }
@@ -109,4 +120,49 @@ export function registerAirspaceTools(server) {
109
120
  structuredContent: { airport, features },
110
121
  };
111
122
  });
123
+ server.registerTool('find_artcc_for_position', {
124
+ title: 'Find the ARTCC center containing a position and altitude',
125
+ description: 'Returns the US Air Route Traffic Control Center (ARTCC) features whose lateral boundary contains the given position at the given altitude. Typically returns a single feature (one center, one stratum), but can return multiple in three cases: (1) oceanic positions covered by overlapping CTA and FIR strata; (2) positions exactly at a stratum boundary (e.g. FL180 matches both LOW and HIGH); (3) antimeridian-split centers like ZAK where a stratum is published as multiple sub-polygons that each cover part of the same geographic area. If the position falls outside any US ARTCC, returns an empty features array. Boundary geometry is summarized as a vertex count to keep responses compact - use find_artcc_by_identifier to retrieve full polygons.',
126
+ inputSchema: {
127
+ lat: z.number().min(-90).max(90).describe('Latitude in decimal degrees (WGS84).'),
128
+ lon: z.number().min(-180).max(180).describe('Longitude in decimal degrees (WGS84).'),
129
+ altitudeFt: z
130
+ .number()
131
+ .optional()
132
+ .describe('Altitude in feet MSL. Defaults to 0 (surface), which selects the LOW stratum where applicable. Pass FL180+ to target HIGH or FL600+ to target UTA.'),
133
+ },
134
+ }, ({ lat, lon, altitudeFt }) => {
135
+ const query = {
136
+ lat,
137
+ lon,
138
+ altitudeFt: altitudeFt ?? 0,
139
+ types: new Set(['ARTCC']),
140
+ };
141
+ const features = airspaceResolver.query(query).map(summarizeFeature);
142
+ return {
143
+ content: [{ type: 'text', text: JSON.stringify({ features }, null, 2) }],
144
+ structuredContent: { features },
145
+ };
146
+ });
147
+ server.registerTool('find_artcc_by_identifier', {
148
+ title: 'Find ARTCC features for a center identifier',
149
+ description: 'Returns every ARTCC feature for the given three-letter center code (e.g. "ZNY", "ZBW", "ZAK"), with full polygon boundary coordinates suitable for drawing. Each US center is published as multiple features (one per stratum: LOW, HIGH, plus oceanic UTA/CTA/FIR), all returned by default. A single stratum can map to more than one feature when the source data has multiple disjoint shapes (e.g. ZOA UTA spans four oceanic delegation areas) or when antimeridian-crossing shapes are split into eastern and western sub-polygons (ZAK and ZAP). Pass a stratum filter to narrow results. Lookup is case-insensitive. Returns an empty features array for unknown identifiers.',
150
+ inputSchema: {
151
+ artccId: z
152
+ .string()
153
+ .min(3)
154
+ .max(3)
155
+ .describe('Three-letter ARTCC center code (e.g. "ZNY", "ZBW").'),
156
+ stratum: z
157
+ .enum(ARTCC_STRATUM_VALUES)
158
+ .optional()
159
+ .describe('Restrict to a single stratum (LOW, HIGH, UTA, CTA, FIR, or CTA/FIR). Omit to return every published stratum for the center.'),
160
+ },
161
+ }, ({ artccId, stratum }) => {
162
+ const features = airspaceResolver.byArtcc(artccId, stratum);
163
+ return {
164
+ content: [{ type: 'text', text: JSON.stringify({ features }, null, 2) }],
165
+ structuredContent: { features },
166
+ };
167
+ });
112
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squawk/mcp",
3
- "version": "0.7.0",
3
+ "version": "0.8.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",
@@ -38,26 +38,26 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@modelcontextprotocol/sdk": "^1.29.0",
41
- "@squawk/airport-data": "^0.6.0",
42
- "@squawk/airports": "^0.5.0",
43
- "@squawk/airspace": "^0.5.1",
44
- "@squawk/airspace-data": "^0.3.2",
45
- "@squawk/airway-data": "^0.4.1",
46
- "@squawk/airways": "^0.3.1",
47
- "@squawk/fix-data": "^0.5.1",
48
- "@squawk/fixes": "^0.2.1",
41
+ "@squawk/airport-data": "^0.6.1",
42
+ "@squawk/airports": "^0.5.1",
43
+ "@squawk/airspace": "^0.6.0",
44
+ "@squawk/airspace-data": "^0.4.0",
45
+ "@squawk/airway-data": "^0.4.2",
46
+ "@squawk/airways": "^0.3.2",
47
+ "@squawk/fix-data": "^0.5.2",
48
+ "@squawk/fixes": "^0.2.2",
49
49
  "@squawk/flight-math": "^0.5.1",
50
- "@squawk/flightplan": "^0.4.1",
51
- "@squawk/geo": "^0.3.1",
52
- "@squawk/icao-registry": "^0.3.1",
53
- "@squawk/icao-registry-data": "^0.4.1",
54
- "@squawk/navaid-data": "^0.5.1",
55
- "@squawk/navaids": "^0.3.1",
56
- "@squawk/notams": "^0.3.1",
57
- "@squawk/procedure-data": "^0.5.1",
58
- "@squawk/procedures": "^0.4.1",
59
- "@squawk/types": "^0.6.0",
60
- "@squawk/weather": "^0.5.0",
50
+ "@squawk/flightplan": "^0.4.2",
51
+ "@squawk/geo": "^0.3.2",
52
+ "@squawk/icao-registry": "^0.3.2",
53
+ "@squawk/icao-registry-data": "^0.4.2",
54
+ "@squawk/navaid-data": "^0.5.2",
55
+ "@squawk/navaids": "^0.3.2",
56
+ "@squawk/notams": "^0.3.2",
57
+ "@squawk/procedure-data": "^0.5.2",
58
+ "@squawk/procedures": "^0.4.2",
59
+ "@squawk/types": "^0.7.0",
60
+ "@squawk/weather": "^0.5.1",
61
61
  "zod": "^4.3.6"
62
62
  },
63
63
  "devDependencies": {