@cyanheads/wsdot-mcp-server 0.2.6 → 0.3.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/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +19 -14
- package/changelog/0.3.x/0.3.0.md +30 -0
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js +7 -1
- package/dist/mcp-server/tools/definitions/get-ferry-schedule.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js +2 -0
- package/dist/mcp-server/tools/definitions/get-terminal-space.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts +4 -0
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js +123 -79
- package/dist/mcp-server/tools/definitions/get-toll-rates.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js +103 -101
- package/dist/mcp-server/tools/definitions/get-travel-times.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts +10 -0
- package/dist/mcp-server/tools/definitions/search-alerts.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js +152 -130
- package/dist/mcp-server/tools/definitions/search-alerts.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts +12 -0
- package/dist/mcp-server/tools/definitions/search-cameras.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js +118 -67
- package/dist/mcp-server/tools/definitions/search-cameras.tool.js.map +1 -1
- package/dist/mcp-server/tools/page-budget.d.ts +56 -0
- package/dist/mcp-server/tools/page-budget.d.ts.map +1 -0
- package/dist/mcp-server/tools/page-budget.js +76 -0
- package/dist/mcp-server/tools/page-budget.js.map +1 -0
- package/package.json +2 -2
- package/server.json +3 -3
|
@@ -4,8 +4,55 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { continuationNotice, fitPageToBudget, MAX_FILTER_LENGTH, PAGE_BYTE_BUDGET, renderPage, } from '../page-budget.js';
|
|
7
8
|
import { routeMatches } from '../../../services/traffic/route-match.js';
|
|
8
9
|
import { getTrafficApiService } from '../../../services/traffic/traffic-service.js';
|
|
10
|
+
const CorridorSchema = z
|
|
11
|
+
.object({
|
|
12
|
+
travelTimeId: z.number().optional().describe('Unique corridor identifier.'),
|
|
13
|
+
name: z.string().optional().describe('Corridor name (e.g. "I-5: Northgate to Downtown").'),
|
|
14
|
+
description: z.string().optional().describe('Additional corridor description.'),
|
|
15
|
+
currentTimeInMinutes: z
|
|
16
|
+
.number()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Current travel time in minutes. Absent when WSDOT reports no measurement for the corridor — a reversible express lane closed in this direction reports none.'),
|
|
19
|
+
averageTimeInMinutes: z
|
|
20
|
+
.number()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Historical average travel time in minutes. Absent when WSDOT reports no measurement for the corridor.'),
|
|
23
|
+
delayInMinutes: z
|
|
24
|
+
.number()
|
|
25
|
+
.optional()
|
|
26
|
+
.describe('Delay above average in minutes. Positive means congestion. Absent when either travel time is unavailable.'),
|
|
27
|
+
timeUpdated: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('When the travel time data was last updated (ISO 8601).'),
|
|
31
|
+
distanceInMiles: z.number().optional().describe('Corridor distance in miles.'),
|
|
32
|
+
startPoint: z
|
|
33
|
+
.object({
|
|
34
|
+
roadName: z.string().optional().describe('Road name at the start.'),
|
|
35
|
+
direction: z
|
|
36
|
+
.string()
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
39
|
+
milePost: z.number().optional().describe('Starting milepost.'),
|
|
40
|
+
})
|
|
41
|
+
.optional()
|
|
42
|
+
.describe('Start of the measured corridor.'),
|
|
43
|
+
endPoint: z
|
|
44
|
+
.object({
|
|
45
|
+
roadName: z.string().optional().describe('Road name at the end.'),
|
|
46
|
+
direction: z
|
|
47
|
+
.string()
|
|
48
|
+
.optional()
|
|
49
|
+
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
50
|
+
milePost: z.number().optional().describe('Ending milepost.'),
|
|
51
|
+
})
|
|
52
|
+
.optional()
|
|
53
|
+
.describe('End of the measured corridor.'),
|
|
54
|
+
})
|
|
55
|
+
.describe('Travel time data for one highway corridor.');
|
|
9
56
|
const DEFAULT_LIMIT = 50;
|
|
10
57
|
const MAX_LIMIT = 500;
|
|
11
58
|
export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
@@ -15,11 +62,13 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
15
62
|
'The route filter matches two ways: a route designation ("I-5", "5", "SR 520") returns every ' +
|
|
16
63
|
'corridor measured on that route, and any text also matches corridor names ("Everett"). ' +
|
|
17
64
|
'When current time exceeds average, the corridor is congested. ' +
|
|
18
|
-
'Results are paged — pass offset/limit to page through the full set
|
|
65
|
+
'Results are paged — pass offset/limit to page through the full set. ' +
|
|
66
|
+
`A page ends at limit or at a ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget, whichever comes first; the notice reports the next offset.`,
|
|
19
67
|
annotations: { readOnlyHint: true },
|
|
20
68
|
input: z.object({
|
|
21
69
|
route: z
|
|
22
70
|
.string()
|
|
71
|
+
.max(MAX_FILTER_LENGTH)
|
|
23
72
|
.optional()
|
|
24
73
|
.describe('Optional filter. A route designation — "I-5", "5", "005", "SR 520", "520" — matches every ' +
|
|
25
74
|
'corridor whose start or end point is on that route, whichever form the feed reports. ' +
|
|
@@ -37,60 +86,10 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
37
86
|
.min(1)
|
|
38
87
|
.max(MAX_LIMIT)
|
|
39
88
|
.optional()
|
|
40
|
-
.describe(`Maximum corridors to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}.`),
|
|
89
|
+
.describe(`Maximum corridors to return in this page (1–${MAX_LIMIT}). Defaults to ${DEFAULT_LIMIT}. A large page ends sooner, at the ${PAGE_BYTE_BUDGET.toLocaleString('en-US')}-byte response budget.`),
|
|
41
90
|
}),
|
|
42
91
|
output: z.object({
|
|
43
|
-
corridors: z
|
|
44
|
-
.array(z
|
|
45
|
-
.object({
|
|
46
|
-
travelTimeId: z.number().optional().describe('Unique corridor identifier.'),
|
|
47
|
-
name: z
|
|
48
|
-
.string()
|
|
49
|
-
.optional()
|
|
50
|
-
.describe('Corridor name (e.g. "I-5: Northgate to Downtown").'),
|
|
51
|
-
description: z.string().optional().describe('Additional corridor description.'),
|
|
52
|
-
currentTimeInMinutes: z
|
|
53
|
-
.number()
|
|
54
|
-
.optional()
|
|
55
|
-
.describe('Current travel time in minutes. Absent when WSDOT reports no measurement for the corridor — a reversible express lane closed in this direction reports none.'),
|
|
56
|
-
averageTimeInMinutes: z
|
|
57
|
-
.number()
|
|
58
|
-
.optional()
|
|
59
|
-
.describe('Historical average travel time in minutes. Absent when WSDOT reports no measurement for the corridor.'),
|
|
60
|
-
delayInMinutes: z
|
|
61
|
-
.number()
|
|
62
|
-
.optional()
|
|
63
|
-
.describe('Delay above average in minutes. Positive means congestion. Absent when either travel time is unavailable.'),
|
|
64
|
-
timeUpdated: z
|
|
65
|
-
.string()
|
|
66
|
-
.optional()
|
|
67
|
-
.describe('When the travel time data was last updated (ISO 8601).'),
|
|
68
|
-
distanceInMiles: z.number().optional().describe('Corridor distance in miles.'),
|
|
69
|
-
startPoint: z
|
|
70
|
-
.object({
|
|
71
|
-
roadName: z.string().optional().describe('Road name at the start.'),
|
|
72
|
-
direction: z
|
|
73
|
-
.string()
|
|
74
|
-
.optional()
|
|
75
|
-
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
76
|
-
milePost: z.number().optional().describe('Starting milepost.'),
|
|
77
|
-
})
|
|
78
|
-
.optional()
|
|
79
|
-
.describe('Start of the measured corridor.'),
|
|
80
|
-
endPoint: z
|
|
81
|
-
.object({
|
|
82
|
-
roadName: z.string().optional().describe('Road name at the end.'),
|
|
83
|
-
direction: z
|
|
84
|
-
.string()
|
|
85
|
-
.optional()
|
|
86
|
-
.describe('Travel direction code: N (north), S (south), E (east), W (west).'),
|
|
87
|
-
milePost: z.number().optional().describe('Ending milepost.'),
|
|
88
|
-
})
|
|
89
|
-
.optional()
|
|
90
|
-
.describe('End of the measured corridor.'),
|
|
91
|
-
})
|
|
92
|
-
.describe('Travel time data for one highway corridor.'))
|
|
93
|
-
.describe('Travel time corridors matching the filter.'),
|
|
92
|
+
corridors: z.array(CorridorSchema).describe('Travel time corridors matching the filter.'),
|
|
94
93
|
}),
|
|
95
94
|
enrichment: {
|
|
96
95
|
totalCount: z
|
|
@@ -144,12 +143,13 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
144
143
|
const totalCount = filtered.length;
|
|
145
144
|
const offset = input.offset ?? 0;
|
|
146
145
|
const limit = input.limit ?? DEFAULT_LIMIT;
|
|
147
|
-
const
|
|
146
|
+
const requested = filtered.slice(offset, offset + limit).map((t) => ({
|
|
148
147
|
...t,
|
|
149
148
|
delayInMinutes: t.currentTimeInMinutes != null && t.averageTimeInMinutes != null
|
|
150
149
|
? t.currentTimeInMinutes - t.averageTimeInMinutes
|
|
151
150
|
: undefined,
|
|
152
151
|
}));
|
|
152
|
+
const corridors = fitPageToBudget(requested, renderCorridor, routeFilter);
|
|
153
153
|
const hasMore = offset + corridors.length < totalCount;
|
|
154
154
|
const nextOffset = hasMore ? offset + corridors.length : null;
|
|
155
155
|
ctx.log.info('Travel times fetched', {
|
|
@@ -169,8 +169,10 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
169
169
|
ctx.enrich.notice(`Offset ${offset} is past the end of ${totalCount} matching corridors. Use an offset between 0 and ${totalCount - 1}.`);
|
|
170
170
|
}
|
|
171
171
|
else {
|
|
172
|
-
const
|
|
173
|
-
ctx.enrich.notice(
|
|
172
|
+
const shown = `Showing corridors ${offset + 1}–${offset + corridors.length} of ${totalCount}.`;
|
|
173
|
+
ctx.enrich.notice(nextOffset === null
|
|
174
|
+
? shown
|
|
175
|
+
: `${shown} ${continuationNotice(nextOffset, corridors.length < requested.length)}`);
|
|
174
176
|
}
|
|
175
177
|
return { corridors };
|
|
176
178
|
},
|
|
@@ -178,51 +180,51 @@ export const getTravelTimes = tool('wsdot_get_travel_times', {
|
|
|
178
180
|
if (result.corridors.length === 0) {
|
|
179
181
|
return [{ type: 'text', text: 'No corridors matched.' }];
|
|
180
182
|
}
|
|
181
|
-
|
|
182
|
-
for (const c of result.corridors) {
|
|
183
|
-
lines.push(`### ${c.name ?? 'Corridor'}`);
|
|
184
|
-
if (c.description)
|
|
185
|
-
lines.push(c.description);
|
|
186
|
-
lines.push(c.currentTimeInMinutes != null
|
|
187
|
-
? `**Current:** ${c.currentTimeInMinutes} min`
|
|
188
|
-
: '**Current:** Not available — WSDOT reports no measurement for this corridor');
|
|
189
|
-
if (c.averageTimeInMinutes != null)
|
|
190
|
-
lines.push(`**Average:** ${c.averageTimeInMinutes} min`);
|
|
191
|
-
if (c.delayInMinutes != null) {
|
|
192
|
-
const sign = c.delayInMinutes > 0 ? '+' : '';
|
|
193
|
-
lines.push(`**Delay:** ${sign}${c.delayInMinutes} min${c.delayInMinutes > 0 ? ' (congested)' : ''}`);
|
|
194
|
-
}
|
|
195
|
-
if (c.distanceInMiles != null)
|
|
196
|
-
lines.push(`**Distance:** ${c.distanceInMiles} mi`);
|
|
197
|
-
if (c.startPoint) {
|
|
198
|
-
const sp = [
|
|
199
|
-
c.startPoint.roadName,
|
|
200
|
-
c.startPoint.direction,
|
|
201
|
-
c.startPoint.milePost != null ? `MP ${c.startPoint.milePost}` : undefined,
|
|
202
|
-
]
|
|
203
|
-
.filter(Boolean)
|
|
204
|
-
.join(' ');
|
|
205
|
-
if (sp)
|
|
206
|
-
lines.push(`**From:** ${sp}`);
|
|
207
|
-
}
|
|
208
|
-
if (c.endPoint) {
|
|
209
|
-
const ep = [
|
|
210
|
-
c.endPoint.roadName,
|
|
211
|
-
c.endPoint.direction,
|
|
212
|
-
c.endPoint.milePost != null ? `MP ${c.endPoint.milePost}` : undefined,
|
|
213
|
-
]
|
|
214
|
-
.filter(Boolean)
|
|
215
|
-
.join(' ');
|
|
216
|
-
if (ep)
|
|
217
|
-
lines.push(`**To:** ${ep}`);
|
|
218
|
-
}
|
|
219
|
-
if (c.timeUpdated)
|
|
220
|
-
lines.push(`**Updated:** ${c.timeUpdated}`);
|
|
221
|
-
if (c.travelTimeId != null)
|
|
222
|
-
lines.push(`**ID:** ${c.travelTimeId}`);
|
|
223
|
-
lines.push('');
|
|
224
|
-
}
|
|
225
|
-
return [{ type: 'text', text: lines.join('\n') }];
|
|
183
|
+
return [{ type: 'text', text: renderPage(result.corridors, renderCorridor) }];
|
|
226
184
|
},
|
|
227
185
|
});
|
|
186
|
+
/** One corridor's `content[]` block — shared by `format()` and the page-budget charge. */
|
|
187
|
+
function renderCorridor(c) {
|
|
188
|
+
const lines = [`### ${c.name ?? 'Corridor'}`];
|
|
189
|
+
if (c.description)
|
|
190
|
+
lines.push(c.description);
|
|
191
|
+
lines.push(c.currentTimeInMinutes != null
|
|
192
|
+
? `**Current:** ${c.currentTimeInMinutes} min`
|
|
193
|
+
: '**Current:** Not available — WSDOT reports no measurement for this corridor');
|
|
194
|
+
if (c.averageTimeInMinutes != null)
|
|
195
|
+
lines.push(`**Average:** ${c.averageTimeInMinutes} min`);
|
|
196
|
+
if (c.delayInMinutes != null) {
|
|
197
|
+
const sign = c.delayInMinutes > 0 ? '+' : '';
|
|
198
|
+
lines.push(`**Delay:** ${sign}${c.delayInMinutes} min${c.delayInMinutes > 0 ? ' (congested)' : ''}`);
|
|
199
|
+
}
|
|
200
|
+
if (c.distanceInMiles != null)
|
|
201
|
+
lines.push(`**Distance:** ${c.distanceInMiles} mi`);
|
|
202
|
+
if (c.startPoint) {
|
|
203
|
+
const sp = [
|
|
204
|
+
c.startPoint.roadName,
|
|
205
|
+
c.startPoint.direction,
|
|
206
|
+
c.startPoint.milePost != null ? `MP ${c.startPoint.milePost}` : undefined,
|
|
207
|
+
]
|
|
208
|
+
.filter(Boolean)
|
|
209
|
+
.join(' ');
|
|
210
|
+
if (sp)
|
|
211
|
+
lines.push(`**From:** ${sp}`);
|
|
212
|
+
}
|
|
213
|
+
if (c.endPoint) {
|
|
214
|
+
const ep = [
|
|
215
|
+
c.endPoint.roadName,
|
|
216
|
+
c.endPoint.direction,
|
|
217
|
+
c.endPoint.milePost != null ? `MP ${c.endPoint.milePost}` : undefined,
|
|
218
|
+
]
|
|
219
|
+
.filter(Boolean)
|
|
220
|
+
.join(' ');
|
|
221
|
+
if (ep)
|
|
222
|
+
lines.push(`**To:** ${ep}`);
|
|
223
|
+
}
|
|
224
|
+
if (c.timeUpdated)
|
|
225
|
+
lines.push(`**Updated:** ${c.timeUpdated}`);
|
|
226
|
+
if (c.travelTimeId != null)
|
|
227
|
+
lines.push(`**ID:** ${c.travelTimeId}`);
|
|
228
|
+
return lines.join('\n');
|
|
229
|
+
}
|
|
228
230
|
//# sourceMappingURL=get-travel-times.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-travel-times.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,
|
|
1
|
+
{"version":3,"file":"get-travel-times.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-travel-times.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GACX,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAE7E,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,CAAC;IACN,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IAC3E,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IAC1F,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC/E,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,8JAA8J,CAC/J;IACH,oBAAoB,EAAE,CAAC;SACpB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uGAAuG,CACxG;IACH,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,2GAA2G,CAC5G;IACH,WAAW,EAAE,CAAC;SAC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C;QACf,MAAM,EAAE,GAAG;YACT,CAAC,CAAC,QAAQ,CAAC,QAAQ;YACnB,CAAC,CAAC,QAAQ,CAAC,SAAS;YACpB,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;SACtE;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,IAAI,EAAE;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,CAAC,CAAC,WAAW;QAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;IAC/D,IAAI,CAAC,CAAC,YAAY,IAAI,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;IACpE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -53,6 +53,16 @@ export declare const searchAlerts: import("@cyanheads/mcp-ts-core").ToolDefiniti
|
|
|
53
53
|
readonly retryable: false;
|
|
54
54
|
readonly recovery: "Register an access code at https://wsdot.wa.gov/traffic/api/, set WSDOT_ACCESS_CODE on the server, and restart it.";
|
|
55
55
|
readonly thrownBy: "service";
|
|
56
|
+
}, {
|
|
57
|
+
readonly reason: "invalid_region";
|
|
58
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
59
|
+
readonly when: "The region is not one of the WSDOT region names the alerts feed carries.";
|
|
60
|
+
readonly recovery: `Pass one of the region names ${string} (case-insensitive), or omit region.`;
|
|
61
|
+
}, {
|
|
62
|
+
readonly reason: "invalid_milepost_range";
|
|
63
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
64
|
+
readonly when: "startMilepost is greater than endMilepost.";
|
|
65
|
+
readonly recovery: "Pass startMilepost less than or equal to endMilepost, or give only one bound for an open-ended range.";
|
|
56
66
|
}], {
|
|
57
67
|
readonly totalCount: z.ZodNumber;
|
|
58
68
|
readonly nextOffset: z.ZodNullable<z.ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-alerts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"search-alerts.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-alerts.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAgFjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0NvB,CAAC"}
|