onebusaway-mcp-server 0.1.1

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.
Files changed (85) hide show
  1. package/CLAUDE.md +367 -0
  2. package/Dockerfile +99 -0
  3. package/LICENSE +201 -0
  4. package/README.md +322 -0
  5. package/changelog/0.1.x/0.1.0.md +15 -0
  6. package/changelog/0.1.x/0.1.1.md +17 -0
  7. package/changelog/template.md +119 -0
  8. package/dist/config/server-config.d.ts +13 -0
  9. package/dist/config/server-config.d.ts.map +1 -0
  10. package/dist/config/server-config.js +26 -0
  11. package/dist/config/server-config.js.map +1 -0
  12. package/dist/index.d.ts +7 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +53 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/mcp-server/resources/definitions/route.resource.d.ts +9 -0
  17. package/dist/mcp-server/resources/definitions/route.resource.d.ts.map +1 -0
  18. package/dist/mcp-server/resources/definitions/route.resource.js +33 -0
  19. package/dist/mcp-server/resources/definitions/route.resource.js.map +1 -0
  20. package/dist/mcp-server/resources/definitions/stop.resource.d.ts +9 -0
  21. package/dist/mcp-server/resources/definitions/stop.resource.d.ts.map +1 -0
  22. package/dist/mcp-server/resources/definitions/stop.resource.js +33 -0
  23. package/dist/mcp-server/resources/definitions/stop.resource.js.map +1 -0
  24. package/dist/mcp-server/tools/definitions/find-routes.tool.d.ts +24 -0
  25. package/dist/mcp-server/tools/definitions/find-routes.tool.d.ts.map +1 -0
  26. package/dist/mcp-server/tools/definitions/find-routes.tool.js +72 -0
  27. package/dist/mcp-server/tools/definitions/find-routes.tool.js.map +1 -0
  28. package/dist/mcp-server/tools/definitions/find-stops.tool.d.ts +28 -0
  29. package/dist/mcp-server/tools/definitions/find-stops.tool.d.ts.map +1 -0
  30. package/dist/mcp-server/tools/definitions/find-stops.tool.js +76 -0
  31. package/dist/mcp-server/tools/definitions/find-stops.tool.js.map +1 -0
  32. package/dist/mcp-server/tools/definitions/get-arrivals.tool.d.ts +49 -0
  33. package/dist/mcp-server/tools/definitions/get-arrivals.tool.d.ts.map +1 -0
  34. package/dist/mcp-server/tools/definitions/get-arrivals.tool.js +176 -0
  35. package/dist/mcp-server/tools/definitions/get-arrivals.tool.js.map +1 -0
  36. package/dist/mcp-server/tools/definitions/get-route.tool.d.ts +25 -0
  37. package/dist/mcp-server/tools/definitions/get-route.tool.d.ts.map +1 -0
  38. package/dist/mcp-server/tools/definitions/get-route.tool.js +60 -0
  39. package/dist/mcp-server/tools/definitions/get-route.tool.js.map +1 -0
  40. package/dist/mcp-server/tools/definitions/get-schedule-for-route.tool.d.ts +31 -0
  41. package/dist/mcp-server/tools/definitions/get-schedule-for-route.tool.d.ts.map +1 -0
  42. package/dist/mcp-server/tools/definitions/get-schedule-for-route.tool.js +107 -0
  43. package/dist/mcp-server/tools/definitions/get-schedule-for-route.tool.js.map +1 -0
  44. package/dist/mcp-server/tools/definitions/get-schedule-for-stop.tool.d.ts +31 -0
  45. package/dist/mcp-server/tools/definitions/get-schedule-for-stop.tool.d.ts.map +1 -0
  46. package/dist/mcp-server/tools/definitions/get-schedule-for-stop.tool.js +105 -0
  47. package/dist/mcp-server/tools/definitions/get-schedule-for-stop.tool.js.map +1 -0
  48. package/dist/mcp-server/tools/definitions/get-stop.tool.d.ts +28 -0
  49. package/dist/mcp-server/tools/definitions/get-stop.tool.d.ts.map +1 -0
  50. package/dist/mcp-server/tools/definitions/get-stop.tool.js +57 -0
  51. package/dist/mcp-server/tools/definitions/get-stop.tool.js.map +1 -0
  52. package/dist/mcp-server/tools/definitions/get-trip.tool.d.ts +42 -0
  53. package/dist/mcp-server/tools/definitions/get-trip.tool.d.ts.map +1 -0
  54. package/dist/mcp-server/tools/definitions/get-trip.tool.js +143 -0
  55. package/dist/mcp-server/tools/definitions/get-trip.tool.js.map +1 -0
  56. package/dist/mcp-server/tools/definitions/get-vehicles.tool.d.ts +34 -0
  57. package/dist/mcp-server/tools/definitions/get-vehicles.tool.d.ts.map +1 -0
  58. package/dist/mcp-server/tools/definitions/get-vehicles.tool.js +117 -0
  59. package/dist/mcp-server/tools/definitions/get-vehicles.tool.js.map +1 -0
  60. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts +23 -0
  61. package/dist/mcp-server/tools/definitions/list-agencies.tool.d.ts.map +1 -0
  62. package/dist/mcp-server/tools/definitions/list-agencies.tool.js +58 -0
  63. package/dist/mcp-server/tools/definitions/list-agencies.tool.js.map +1 -0
  64. package/dist/mcp-server/tools/definitions/list-routes-for-agency.tool.d.ts +25 -0
  65. package/dist/mcp-server/tools/definitions/list-routes-for-agency.tool.d.ts.map +1 -0
  66. package/dist/mcp-server/tools/definitions/list-routes-for-agency.tool.js +71 -0
  67. package/dist/mcp-server/tools/definitions/list-routes-for-agency.tool.js.map +1 -0
  68. package/dist/mcp-server/tools/definitions/search-routes.tool.d.ts +26 -0
  69. package/dist/mcp-server/tools/definitions/search-routes.tool.d.ts.map +1 -0
  70. package/dist/mcp-server/tools/definitions/search-routes.tool.js +68 -0
  71. package/dist/mcp-server/tools/definitions/search-routes.tool.js.map +1 -0
  72. package/dist/mcp-server/tools/definitions/search-stops.tool.d.ts +25 -0
  73. package/dist/mcp-server/tools/definitions/search-stops.tool.d.ts.map +1 -0
  74. package/dist/mcp-server/tools/definitions/search-stops.tool.js +61 -0
  75. package/dist/mcp-server/tools/definitions/search-stops.tool.js.map +1 -0
  76. package/dist/services/onebusaway/onebusaway-service.d.ts +64 -0
  77. package/dist/services/onebusaway/onebusaway-service.d.ts.map +1 -0
  78. package/dist/services/onebusaway/onebusaway-service.js +441 -0
  79. package/dist/services/onebusaway/onebusaway-service.js.map +1 -0
  80. package/dist/services/onebusaway/types.d.ts +147 -0
  81. package/dist/services/onebusaway/types.d.ts.map +1 -0
  82. package/dist/services/onebusaway/types.js +6 -0
  83. package/dist/services/onebusaway/types.js.map +1 -0
  84. package/package.json +90 -0
  85. package/server.json +127 -0
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @fileoverview OneBusAway stop metadata resource.
3
+ * @module mcp-server/resources/definitions/stop.resource
4
+ */
5
+ import { resource, z } from '@cyanheads/mcp-ts-core';
6
+ import { getOneBusAwayService } from '../../../services/onebusaway/onebusaway-service.js';
7
+ export const stopResource = resource('onebusaway://stop/{stopId}', {
8
+ name: 'onebusaway-stop',
9
+ title: 'OneBusAway Stop',
10
+ description: 'Stop metadata — name, coordinates, served routes, and wheelchair accessibility. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403").',
11
+ mimeType: 'application/json',
12
+ params: z.object({
13
+ stopId: z
14
+ .string()
15
+ .describe('Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403).'),
16
+ }),
17
+ async handler(params, ctx) {
18
+ ctx.log.debug('stopResource handler', { stopId: params.stopId });
19
+ const stop = await getOneBusAwayService().getStop(params.stopId, ctx);
20
+ return stop;
21
+ },
22
+ list: async () => ({
23
+ resources: [
24
+ {
25
+ uri: 'onebusaway://stop/1_75403',
26
+ name: 'Example: Metro Transit Stop 75403',
27
+ mimeType: 'application/json',
28
+ description: 'Stop metadata for Metro Transit stop 75403 (Puget Sound instance).',
29
+ },
30
+ ],
31
+ }),
32
+ });
33
+ //# sourceMappingURL=stop.resource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/stop.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,4BAA4B,EAAE;IACjE,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,6JAA6J;IAC/J,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,CAAC,wEAAwE,CAAC;KACtF,CAAC;IAEF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,GAAG,MAAM,oBAAoB,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,2BAA2B;gBAChC,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;gBAC5B,WAAW,EAAE,oEAAoE;aAClF;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @fileoverview Find transit routes near a geographic location.
3
+ * @module mcp-server/tools/definitions/find-routes.tool
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ export declare const findRoutes: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
7
+ lat: z.ZodNumber;
8
+ lon: z.ZodNumber;
9
+ radius: z.ZodDefault<z.ZodNumber>;
10
+ query: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ routes: z.ZodArray<z.ZodObject<{
13
+ id: z.ZodString;
14
+ shortName: z.ZodString;
15
+ longName: z.ZodString;
16
+ description: z.ZodString;
17
+ agencyId: z.ZodString;
18
+ agencyName: z.ZodString;
19
+ type: z.ZodNumber;
20
+ color: z.ZodNullable<z.ZodString>;
21
+ url: z.ZodNullable<z.ZodString>;
22
+ }, z.core.$strip>>;
23
+ }, z.core.$strip>, undefined>;
24
+ //# sourceMappingURL=find-routes.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-routes.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-routes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;6BAuErB,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * @fileoverview Find transit routes near a geographic location.
3
+ * @module mcp-server/tools/definitions/find-routes.tool
4
+ */
5
+ import { tool, z } from '@cyanheads/mcp-ts-core';
6
+ import { getOneBusAwayService } from '../../../services/onebusaway/onebusaway-service.js';
7
+ export const findRoutes = tool('onebusaway_find_routes', {
8
+ title: 'Find Routes Near Location',
9
+ description: 'Find transit routes near a location, optionally filtered by name or number. Returns routes with IDs, short names, and descriptions. Use routeId values to fetch schedules, vehicles, or stop sequences.',
10
+ annotations: { readOnlyHint: true },
11
+ input: z.object({
12
+ lat: z.number().describe('Latitude of the search center.'),
13
+ lon: z.number().describe('Longitude of the search center.'),
14
+ radius: z.number().default(500).describe('Search radius in meters. Defaults to 500m.'),
15
+ query: z
16
+ .string()
17
+ .optional()
18
+ .describe('Filter by route name or number (e.g. "44" or "Link Light Rail").'),
19
+ }),
20
+ output: z.object({
21
+ routes: z
22
+ .array(z
23
+ .object({
24
+ id: z
25
+ .string()
26
+ .describe('Agency-prefixed route ID (e.g. "1_100259"). Use with onebusaway_get_schedule_for_route or onebusaway_get_vehicles.'),
27
+ shortName: z
28
+ .string()
29
+ .describe('The number or short name displayed on vehicles (e.g. "44").'),
30
+ longName: z.string().describe('Full route name.'),
31
+ description: z.string().describe('Route description.'),
32
+ agencyId: z.string().describe('Agency ID that operates this route.'),
33
+ agencyName: z.string().describe('Agency name that operates this route.'),
34
+ type: z
35
+ .number()
36
+ .describe('GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car.'),
37
+ color: z.string().nullable().describe('Route brand color hex (without #), or null.'),
38
+ url: z.string().nullable().describe('Agency schedule page URL, or null.'),
39
+ })
40
+ .describe('A transit route with agency and type information.'))
41
+ .describe('Routes found near the specified location.'),
42
+ }),
43
+ async handler(input, ctx) {
44
+ const routes = await getOneBusAwayService().findRoutes({
45
+ lat: input.lat,
46
+ lon: input.lon,
47
+ radius: input.radius,
48
+ ...(input.query && { query: input.query }),
49
+ }, ctx);
50
+ ctx.log.info('findRoutes completed', { count: routes.length });
51
+ return { routes };
52
+ },
53
+ format: (result) => {
54
+ if (result.routes.length === 0) {
55
+ return [{ type: 'text', text: 'No routes found near this location.' }];
56
+ }
57
+ const lines = [`**Routes found:** ${result.routes.length}`];
58
+ for (const r of result.routes) {
59
+ lines.push(`\n## ${r.shortName}${r.longName ? ` — ${r.longName}` : ''}`);
60
+ lines.push(`**ID:** ${r.id} | **Agency:** ${r.agencyName} (${r.agencyId})`);
61
+ if (r.description)
62
+ lines.push(`**Description:** ${r.description}`);
63
+ lines.push(`**Type:** ${r.type}`);
64
+ if (r.color)
65
+ lines.push(`**Color:** #${r.color}`);
66
+ if (r.url)
67
+ lines.push(`**Schedule URL:** ${r.url}`);
68
+ }
69
+ return [{ type: 'text', text: lines.join('\n') }];
70
+ },
71
+ });
72
+ //# sourceMappingURL=find-routes.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-routes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-routes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACvD,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,yMAAyM;IAC3M,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;IACnC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;YAC5E,IAAI,CAAC,CAAC,WAAW;gBAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YACnE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAClC,IAAI,CAAC,CAAC,KAAK;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;YAClD,IAAI,CAAC,CAAC,GAAG;gBAAE,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QACtD,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @fileoverview Find bus stops near a geographic location.
3
+ * @module mcp-server/tools/definitions/find-stops.tool
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ export declare const findStops: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
7
+ lat: z.ZodNumber;
8
+ lon: z.ZodNumber;
9
+ radius: z.ZodDefault<z.ZodNumber>;
10
+ query: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ stops: z.ZodArray<z.ZodObject<{
13
+ id: z.ZodString;
14
+ code: z.ZodString;
15
+ name: z.ZodString;
16
+ lat: z.ZodNumber;
17
+ lon: z.ZodNumber;
18
+ direction: z.ZodString;
19
+ routeIds: z.ZodArray<z.ZodString>;
20
+ wheelchairBoarding: z.ZodEnum<{
21
+ ACCESSIBLE: "ACCESSIBLE";
22
+ NOT_ACCESSIBLE: "NOT_ACCESSIBLE";
23
+ UNKNOWN: "UNKNOWN";
24
+ }>;
25
+ }, z.core.$strip>>;
26
+ limitExceeded: z.ZodBoolean;
27
+ }, z.core.$strip>, undefined>;
28
+ //# sourceMappingURL=find-stops.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-stops.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-stops.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGjD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;6BAgFpB,CAAC"}
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @fileoverview Find bus stops near a geographic location.
3
+ * @module mcp-server/tools/definitions/find-stops.tool
4
+ */
5
+ import { tool, z } from '@cyanheads/mcp-ts-core';
6
+ import { getOneBusAwayService } from '../../../services/onebusaway/onebusaway-service.js';
7
+ export const findStops = tool('onebusaway_find_stops', {
8
+ title: 'Find Stops Near Location',
9
+ description: 'Find bus stops near a location. Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status. Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals. Optionally filter by stop code (the number printed on the stop sign, e.g. "75403").',
10
+ annotations: { readOnlyHint: true },
11
+ input: z.object({
12
+ lat: z.number().describe('Latitude of the search center.'),
13
+ lon: z.number().describe('Longitude of the search center.'),
14
+ radius: z
15
+ .number()
16
+ .default(300)
17
+ .describe('Search radius in meters. Defaults to 300m. Max ~1600m before results degrade.'),
18
+ query: z
19
+ .string()
20
+ .optional()
21
+ .describe('Optional stop code filter (the number printed on the stop sign, e.g. "75403"). When provided, returns only stops matching this code within the radius.'),
22
+ }),
23
+ output: z.object({
24
+ stops: z
25
+ .array(z
26
+ .object({
27
+ id: z
28
+ .string()
29
+ .describe('Agency-prefixed stop ID (e.g. "1_75403"). Use with onebusaway_get_arrivals.'),
30
+ code: z.string().describe('The stop code printed on the sign.'),
31
+ name: z.string().describe('Stop name.'),
32
+ lat: z.number().describe('Latitude of the stop.'),
33
+ lon: z.number().describe('Longitude of the stop.'),
34
+ direction: z.string().describe('Compass direction of travel at this stop (e.g. "NW").'),
35
+ routeIds: z.array(z.string()).describe('IDs of routes that serve this stop.'),
36
+ wheelchairBoarding: z
37
+ .enum(['ACCESSIBLE', 'NOT_ACCESSIBLE', 'UNKNOWN'])
38
+ .describe('Wheelchair boarding status.'),
39
+ })
40
+ .describe('A transit stop with location and route information.'))
41
+ .describe('Stops within the search radius.'),
42
+ limitExceeded: z
43
+ .boolean()
44
+ .describe('True if more stops exist beyond the returned set; narrow the radius to see all.'),
45
+ }),
46
+ async handler(input, ctx) {
47
+ const result = await getOneBusAwayService().findStops({
48
+ lat: input.lat,
49
+ lon: input.lon,
50
+ radius: input.radius,
51
+ ...(input.query && { query: input.query }),
52
+ }, ctx);
53
+ ctx.log.info('findStops completed', {
54
+ count: result.stops.length,
55
+ limitExceeded: result.limitExceeded,
56
+ });
57
+ return result;
58
+ },
59
+ format: (result) => {
60
+ const lines = [
61
+ `**Stops found:** ${result.stops.length} | **Limit exceeded:** ${result.limitExceeded}`,
62
+ ];
63
+ if (result.limitExceeded) {
64
+ lines.push('> Results truncated — narrow the radius to see all stops.');
65
+ }
66
+ for (const s of result.stops) {
67
+ lines.push(`\n## ${s.name}`);
68
+ lines.push(`**ID:** ${s.id} | **Code:** ${s.code} | **Direction:** ${s.direction}`);
69
+ lines.push(`**Coordinates:** ${s.lat.toFixed(6)}, ${s.lon.toFixed(6)}`);
70
+ lines.push(`**Routes:** ${s.routeIds.join(', ') || 'none'}`);
71
+ lines.push(`**Wheelchair:** ${s.wheelchairBoarding}`);
72
+ }
73
+ return [{ type: 'text', text: lines.join('\n') }];
74
+ },
75
+ });
76
+ //# sourceMappingURL=find-stops.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-stops.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-stops.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OA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,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,IAAI,qBAAqB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;YACpF,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YACxE,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,EAAE,CAAC,CAAC;YAC7D,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,kBAAkB,EAAE,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @fileoverview Real-time arrivals and departures at a stop.
3
+ * @module mcp-server/tools/definitions/get-arrivals.tool
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ export declare const getArrivals: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
+ stopId: z.ZodString;
9
+ minutesBefore: z.ZodDefault<z.ZodNumber>;
10
+ minutesAfter: z.ZodDefault<z.ZodNumber>;
11
+ }, z.core.$strip>, z.ZodObject<{
12
+ stopId: z.ZodString;
13
+ stopName: z.ZodString;
14
+ currentTime: z.ZodNumber;
15
+ arrivals: z.ZodArray<z.ZodObject<{
16
+ routeShortName: z.ZodString;
17
+ tripHeadsign: z.ZodString;
18
+ predicted: z.ZodBoolean;
19
+ predictedArrivalTime: z.ZodNullable<z.ZodNumber>;
20
+ scheduledArrivalTime: z.ZodNumber;
21
+ scheduleDeviation: z.ZodNumber;
22
+ vehicleId: z.ZodNullable<z.ZodString>;
23
+ vehiclePosition: z.ZodNullable<z.ZodObject<{
24
+ lat: z.ZodNumber;
25
+ lon: z.ZodNumber;
26
+ }, z.core.$strip>>;
27
+ stopsAway: z.ZodNullable<z.ZodNumber>;
28
+ tripId: z.ZodString;
29
+ routeId: z.ZodString;
30
+ situationIds: z.ZodArray<z.ZodString>;
31
+ }, z.core.$strip>>;
32
+ situations: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodString;
34
+ summary: z.ZodString;
35
+ description: z.ZodNullable<z.ZodString>;
36
+ }, z.core.$strip>>;
37
+ }, z.core.$strip>, readonly [{
38
+ readonly reason: "stop_not_found";
39
+ readonly code: JsonRpcErrorCode.NotFound;
40
+ readonly when: "Stop ID does not exist on this instance.";
41
+ readonly recovery: "Search for the stop with onebusaway_find_stops or onebusaway_search_stops to get a valid ID.";
42
+ }, {
43
+ readonly reason: "rate_limited";
44
+ readonly code: JsonRpcErrorCode.RateLimited;
45
+ readonly retryable: true;
46
+ readonly when: "API returned a rate limit response.";
47
+ readonly recovery: "Wait a moment and retry; the Puget Sound instance enforces ~20 req/min per IP.";
48
+ }]>;
49
+ //# sourceMappingURL=get-arrivals.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-arrivals.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-arrivals.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmBjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4KtB,CAAC"}
@@ -0,0 +1,176 @@
1
+ /**
2
+ * @fileoverview Real-time arrivals and departures at a stop.
3
+ * @module mcp-server/tools/definitions/get-arrivals.tool
4
+ */
5
+ import { tool, z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ import { getOneBusAwayService } from '../../../services/onebusaway/onebusaway-service.js';
8
+ /** Format Unix milliseconds as a human-readable HH:MM time string. */
9
+ function fmtTime(ms) {
10
+ const d = new Date(ms);
11
+ const h = d.getHours().toString().padStart(2, '0');
12
+ const m = d.getMinutes().toString().padStart(2, '0');
13
+ return `${h}:${m}`;
14
+ }
15
+ /** Format schedule deviation (seconds) as a readable label. */
16
+ function fmtDeviation(seconds) {
17
+ if (seconds === 0)
18
+ return 'on time';
19
+ const abs = Math.abs(seconds);
20
+ const mins = Math.round(abs / 60);
21
+ return seconds > 0 ? `${mins} min late` : `${mins} min early`;
22
+ }
23
+ export const getArrivals = tool('onebusaway_get_arrivals', {
24
+ title: 'Get Real-Time Arrivals',
25
+ description: 'Real-time arrivals and departures at a stop. Returns predicted arrival times, schedule deviation (how many seconds late/early), vehicle positions, and any active service alerts. The predicted boolean on each arrival indicates whether GPS tracking backs the estimate — predicted=false means schedule-only. Use tripId from results for follow-up onebusaway_get_trip calls. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403").',
26
+ annotations: { readOnlyHint: true },
27
+ input: z.object({
28
+ stopId: z
29
+ .string()
30
+ .min(1)
31
+ .describe('Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs.'),
32
+ minutesBefore: z
33
+ .number()
34
+ .default(5)
35
+ .describe('Include arrivals that departed up to this many minutes ago. Defaults to 5.'),
36
+ minutesAfter: z
37
+ .number()
38
+ .default(35)
39
+ .describe('Include arrivals expected within the next N minutes. Defaults to 35.'),
40
+ }),
41
+ output: z.object({
42
+ stopId: z.string().describe('The queried stop ID.'),
43
+ stopName: z.string().describe('Stop name.'),
44
+ currentTime: z
45
+ .number()
46
+ .describe('Server time as Unix milliseconds, for computing countdown timers.'),
47
+ arrivals: z
48
+ .array(z
49
+ .object({
50
+ routeShortName: z.string().describe('Route short name (e.g. "44").'),
51
+ tripHeadsign: z.string().describe('Destination sign text (e.g. "Downtown Seattle").'),
52
+ predicted: z
53
+ .boolean()
54
+ .describe('True if GPS-tracked real-time data is available; false if schedule-only.'),
55
+ predictedArrivalTime: z
56
+ .number()
57
+ .nullable()
58
+ .describe('Predicted arrival time as Unix milliseconds. Null when predicted=false.'),
59
+ scheduledArrivalTime: z
60
+ .number()
61
+ .describe('Scheduled arrival time as Unix milliseconds.'),
62
+ scheduleDeviation: z
63
+ .number()
64
+ .describe('Seconds late (positive) or early (negative). Only meaningful when predicted=true.'),
65
+ vehicleId: z.string().nullable().describe('Vehicle ID if known, or null.'),
66
+ vehiclePosition: z
67
+ .object({
68
+ lat: z.number().describe('Vehicle latitude.'),
69
+ lon: z.number().describe('Vehicle longitude.'),
70
+ })
71
+ .nullable()
72
+ .describe('Current vehicle position if available, or null.'),
73
+ stopsAway: z
74
+ .number()
75
+ .nullable()
76
+ .describe('Number of stops until this stop, or null if unknown.'),
77
+ tripId: z.string().describe('Trip ID for follow-up onebusaway_get_trip calls.'),
78
+ routeId: z.string().describe('Route ID for follow-up route calls.'),
79
+ situationIds: z
80
+ .array(z.string())
81
+ .describe('IDs of active service alerts affecting this arrival.'),
82
+ })
83
+ .describe('A single arrival or departure at this stop.'))
84
+ .describe('Arrivals and departures at this stop within the requested time window.'),
85
+ situations: z
86
+ .array(z
87
+ .object({
88
+ id: z.string().describe('Situation ID.'),
89
+ summary: z.string().describe('Short summary of the service alert.'),
90
+ description: z
91
+ .string()
92
+ .nullable()
93
+ .describe('Longer description of the service alert, or null.'),
94
+ })
95
+ .describe('A single active service alert.'))
96
+ .describe('Active service alerts referenced by arrivals at this stop.'),
97
+ }),
98
+ errors: [
99
+ {
100
+ reason: 'stop_not_found',
101
+ code: JsonRpcErrorCode.NotFound,
102
+ when: 'Stop ID does not exist on this instance.',
103
+ recovery: 'Search for the stop with onebusaway_find_stops or onebusaway_search_stops to get a valid ID.',
104
+ },
105
+ {
106
+ reason: 'rate_limited',
107
+ code: JsonRpcErrorCode.RateLimited,
108
+ retryable: true,
109
+ when: 'API returned a rate limit response.',
110
+ recovery: 'Wait a moment and retry; the Puget Sound instance enforces ~20 req/min per IP.',
111
+ },
112
+ ],
113
+ async handler(input, ctx) {
114
+ const result = await getOneBusAwayService().getArrivals({
115
+ stopId: input.stopId,
116
+ minutesBefore: input.minutesBefore,
117
+ minutesAfter: input.minutesAfter,
118
+ }, ctx);
119
+ ctx.log.info('getArrivals completed', {
120
+ stopId: input.stopId,
121
+ count: result.arrivals.length,
122
+ situations: result.situations.length,
123
+ });
124
+ return result;
125
+ },
126
+ format: (result) => {
127
+ const lines = [
128
+ `## Arrivals at ${result.stopName} (${result.stopId})`,
129
+ `**Current time:** ${fmtTime(result.currentTime)} (${result.currentTime})`,
130
+ `**Arrivals:** ${result.arrivals.length}`,
131
+ ];
132
+ if (result.arrivals.length === 0) {
133
+ lines.push('\n_No arrivals in the requested time window._');
134
+ }
135
+ else {
136
+ for (const a of result.arrivals) {
137
+ const arrivalTime = a.predictedArrivalTime ?? a.scheduledArrivalTime;
138
+ const timeStr = fmtTime(arrivalTime);
139
+ const devStr = a.predicted ? ` (${fmtDeviation(a.scheduleDeviation)})` : ' (scheduled)';
140
+ lines.push(`\n### Route ${a.routeShortName} → ${a.tripHeadsign}`);
141
+ lines.push(`**Arrives:** ${timeStr}${devStr}`);
142
+ lines.push(`**Scheduled:** ${fmtTime(a.scheduledArrivalTime)} (${a.scheduledArrivalTime})`);
143
+ if (a.predictedArrivalTime != null) {
144
+ lines.push(`**Predicted:** ${fmtTime(a.predictedArrivalTime)} (${a.predictedArrivalTime})`);
145
+ }
146
+ lines.push(`**Trip ID:** ${a.tripId} | **Route ID:** ${a.routeId}`);
147
+ if (a.stopsAway != null && a.stopsAway >= 0) {
148
+ lines.push(`**Stops away:** ${a.stopsAway === 0 ? 'At stop' : a.stopsAway}`);
149
+ }
150
+ else if (a.stopsAway != null && a.stopsAway < 0) {
151
+ lines.push(`**Stops away:** Arrived`);
152
+ }
153
+ if (a.vehicleId)
154
+ lines.push(`**Vehicle:** ${a.vehicleId}`);
155
+ if (a.vehiclePosition) {
156
+ lines.push(`**Vehicle position:** ${a.vehiclePosition.lat.toFixed(5)}, ${a.vehiclePosition.lon.toFixed(5)}`);
157
+ }
158
+ if (a.situationIds.length > 0) {
159
+ lines.push(`**Alerts:** ${a.situationIds.join(', ')}`);
160
+ }
161
+ lines.push(`**GPS-tracked:** ${a.predicted}`);
162
+ lines.push(`**Schedule deviation:** ${fmtDeviation(a.scheduleDeviation)} (${a.scheduleDeviation}s)`);
163
+ }
164
+ }
165
+ if (result.situations.length > 0) {
166
+ lines.push('\n## Service Alerts');
167
+ for (const s of result.situations) {
168
+ lines.push(`\n### ${s.summary} (${s.id})`);
169
+ if (s.description)
170
+ lines.push(s.description);
171
+ }
172
+ }
173
+ return [{ type: 'text', text: lines.join('\n') }];
174
+ },
175
+ });
176
+ //# sourceMappingURL=get-arrivals.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-arrivals.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-arrivals.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,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,sEAAsE;AACtE,SAAS,OAAO,CAAC,EAAU;IACzB,MAAM,CAAC,GAAG,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACnD,MAAM,CAA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C,IAAI,CAAC,oBAAoB,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC9C,KAAK,CAAC,IAAI,CACR,2BAA2B,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,iBAAiB,IAAI,CACzF,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;YAClC,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;gBAClC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;gBAC3C,IAAI,CAAC,CAAC,WAAW;oBAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @fileoverview Fetch details for a specific route by ID.
3
+ * @module mcp-server/tools/definitions/get-route.tool
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ export declare const getRoute: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
+ routeId: z.ZodString;
9
+ }, z.core.$strip>, z.ZodObject<{
10
+ id: z.ZodString;
11
+ shortName: z.ZodString;
12
+ longName: z.ZodString;
13
+ description: z.ZodString;
14
+ agencyId: z.ZodString;
15
+ agencyName: z.ZodString;
16
+ type: z.ZodNumber;
17
+ color: z.ZodNullable<z.ZodString>;
18
+ url: z.ZodNullable<z.ZodString>;
19
+ }, z.core.$strip>, readonly [{
20
+ readonly reason: "route_not_found";
21
+ readonly code: JsonRpcErrorCode.NotFound;
22
+ readonly when: "Route ID does not exist on this instance.";
23
+ readonly recovery: "Search for the route with onebusaway_find_routes or onebusaway_search_routes to get a valid ID.";
24
+ }]>;
25
+ //# sourceMappingURL=get-route.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-route.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-route.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;GAsDnB,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @fileoverview Fetch details for a specific route by ID.
3
+ * @module mcp-server/tools/definitions/get-route.tool
4
+ */
5
+ import { tool, z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ import { getOneBusAwayService } from '../../../services/onebusaway/onebusaway-service.js';
8
+ export const getRoute = tool('onebusaway_get_route', {
9
+ title: 'Get Route Details',
10
+ description: 'Fetch details for a specific route by ID. Returns short name, description, agency, route type, and schedule URL. Route IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_100259").',
11
+ annotations: { readOnlyHint: true },
12
+ input: z.object({
13
+ routeId: z
14
+ .string()
15
+ .min(1)
16
+ .describe('Agency-prefixed route ID (e.g. "1_100259"). Use onebusaway_find_routes or onebusaway_search_routes to discover IDs.'),
17
+ }),
18
+ output: z.object({
19
+ id: z.string().describe('Agency-prefixed route ID.'),
20
+ shortName: z.string().describe('The number or short name displayed on vehicles (e.g. "44").'),
21
+ longName: z.string().describe('Full route name.'),
22
+ description: z.string().describe('Route description.'),
23
+ agencyId: z.string().describe('Agency ID that operates this route.'),
24
+ agencyName: z.string().describe('Agency name that operates this route.'),
25
+ type: z
26
+ .number()
27
+ .describe('GTFS route type: 0=tram, 1=subway, 2=rail, 3=bus, 4=ferry, 5=cable_car.'),
28
+ color: z.string().nullable().describe('Route brand color hex (without #), or null.'),
29
+ url: z.string().nullable().describe('Agency schedule page URL, or null.'),
30
+ }),
31
+ errors: [
32
+ {
33
+ reason: 'route_not_found',
34
+ code: JsonRpcErrorCode.NotFound,
35
+ when: 'Route ID does not exist on this instance.',
36
+ recovery: 'Search for the route with onebusaway_find_routes or onebusaway_search_routes to get a valid ID.',
37
+ },
38
+ ],
39
+ async handler(input, ctx) {
40
+ const route = await getOneBusAwayService().getRoute(input.routeId, ctx);
41
+ ctx.log.info('getRoute completed', { routeId: input.routeId });
42
+ return route;
43
+ },
44
+ format: (result) => {
45
+ const lines = [
46
+ `## ${result.shortName}${result.longName ? ` — ${result.longName}` : ''}`,
47
+ `**ID:** ${result.id}`,
48
+ `**Agency:** ${result.agencyName} (${result.agencyId})`,
49
+ ];
50
+ if (result.description)
51
+ lines.push(`**Description:** ${result.description}`);
52
+ lines.push(`**Type:** ${result.type}`);
53
+ if (result.color)
54
+ lines.push(`**Color:** #${result.color}`);
55
+ if (result.url)
56
+ lines.push(`**Schedule URL:** ${result.url}`);
57
+ return [{ type: 'text', text: lines.join('\n') }];
58
+ },
59
+ });
60
+ //# sourceMappingURL=get-route.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-route.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-route.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,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAEnF,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,EAAE;IACnD,KAAK,EAAE,mBAA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AAM,oBAAoB,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACxE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa;YACtB,MAAM,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE;YACzE,WAAW,MAAM,CAAC,EAAE,EAAE;YACtB,eAAe,MAAM,CAAC,UAAU,KAAK,MAAM,CAAC,QAAQ,GAAG;SACxD,CAAC;QACF,IAAI,MAAM,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAC7E,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,MAAM,CAAC,KAAK;YAAE,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;QAC5D,IAAI,MAAM,CAAC,GAAG;YAAE,KAAK,CAAC,IAAI,CAAC,qBAAqB,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC;QAC9D,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * @fileoverview Full-day schedule for a route — all trips and stop sequences.
3
+ * @module mcp-server/tools/definitions/get-schedule-for-route.tool
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ export declare const getScheduleForRoute: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
+ routeId: z.ZodString;
9
+ date: z.ZodOptional<z.ZodString>;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ routeId: z.ZodString;
12
+ routeShortName: z.ZodString;
13
+ serviceDateMs: z.ZodNumber;
14
+ trips: z.ZodArray<z.ZodObject<{
15
+ tripId: z.ZodString;
16
+ tripHeadsign: z.ZodString;
17
+ serviceId: z.ZodString;
18
+ stops: z.ZodArray<z.ZodObject<{
19
+ stopId: z.ZodString;
20
+ stopName: z.ZodString;
21
+ arrivalTime: z.ZodNumber;
22
+ departureTime: z.ZodNumber;
23
+ }, z.core.$strip>>;
24
+ }, z.core.$strip>>;
25
+ }, z.core.$strip>, readonly [{
26
+ readonly reason: "route_not_found";
27
+ readonly code: JsonRpcErrorCode.NotFound;
28
+ readonly when: "Route ID does not exist on this instance.";
29
+ readonly recovery: "Search for the route with onebusaway_find_routes or onebusaway_search_routes to get a valid ID.";
30
+ }]>;
31
+ //# sourceMappingURL=get-schedule-for-route.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-schedule-for-route.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-schedule-for-route.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAejE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;GAuG9B,CAAC"}