Skip to content

Commit c6affee

Browse files
committed
style: apply prettier to route tool schemas and smoke test
CI runs format:check on every PR; this is the first PR to trigger it since the workflow was added. The avoid_tolls one-liner in three route tools (introduced in #80) and a long console.log line in the new transit test both exceeded prettier's print-width and are split to match the existing avoid_highways formatting. No semantic changes.
1 parent 9ada5a7 commit c6affee

4 files changed

Lines changed: 13 additions & 6 deletions

File tree

src/tools/maps/directions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ const SCHEMA = {
1515
.describe("Travel mode for directions"),
1616
departure_time: z.string().optional().describe("Departure time (ISO string format)"),
1717
arrival_time: z.string().optional().describe("Arrival time (ISO string format)"),
18-
avoid_tolls: z.boolean().optional().describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
18+
avoid_tolls: z
19+
.boolean()
20+
.optional()
21+
.describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
1922
avoid_highways: z
2023
.boolean()
2124
.optional()

src/tools/maps/distanceMatrix.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ const SCHEMA = {
1919
.describe(
2020
"Departure time in ISO 8601 format (e.g. 2026-03-21T09:00:00Z). Enables traffic-aware duration estimates."
2121
),
22-
avoid_tolls: z.boolean().optional().describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
22+
avoid_tolls: z
23+
.boolean()
24+
.optional()
25+
.describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
2326
avoid_highways: z
2427
.boolean()
2528
.optional()

src/tools/maps/planRoute.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ const SCHEMA = {
1919
.string()
2020
.optional()
2121
.describe("Departure time in ISO 8601 format (e.g. 2026-03-21T09:00:00Z). Enables traffic-aware routing."),
22-
avoid_tolls: z.boolean().optional().describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
22+
avoid_tolls: z
23+
.boolean()
24+
.optional()
25+
.describe('Avoid toll roads where reasonable. Only supported with mode "driving".'),
2326
avoid_highways: z
2427
.boolean()
2528
.optional()

tests/smoke.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,9 +1136,7 @@ async function testTransitDetailsField(session: McpSession): Promise<void> {
11361136
const transitStep = steps.find((s: any) => s.transitDetails);
11371137
if (!transitStep) {
11381138
// Routes API may rarely return a walking-only itinerary; warn but don't flaky-fail.
1139-
console.log(
1140-
" ⚠️ No transit step in this itinerary — field mask correctness cannot be asserted this run"
1141-
);
1139+
console.log(" ⚠️ No transit step in this itinerary — field mask correctness cannot be asserted this run");
11421140
return;
11431141
}
11441142

0 commit comments

Comments
 (0)