{"openapi":"3.1.0","info":{"title":"Transit (BYOK) API","version":"0.1.0","description":"Transit (BYOK) lets an AI assistant read your own Transit data through the Transit API with a key you supply (Transit API key). Read-only: 12 tools (list_available_networks, search_stops, list_nearby_stops, get_stop_details, list_nearby_routes, get_stop_departures, get_route_details, list_vehicles, list_service_alerts, get_network_latest_update, plan_trip, list_nearby_shared_vehicles). The BYOK...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-transitapp.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-transitapp/docs"},"termsOfService":"https://connectorbay.com/byok-transitapp/terms"},"servers":[{"url":"https://byok-transitapp.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-transitapp/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_available_networks":{"post":{"operationId":"list_available_networks","summary":"List the transit networks (agencies and shared-mobility systems) Transit covers, optionally only those serving a point o","description":"List the transit networks (agencies and shared-mobility systems) Transit covers, optionally only those serving a point or a country, with their ids, region, type and modes. Map geometry is left out. Use for \"Which transit networks does Transit cover in Canada\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"anyOf":[{"maximum":90,"minimum":-90,"type":"number"},{"type":"null"}],"default":null,"description":"Optional latitude; give with lon to narrow the answer to services around that point.","title":"Lat"},"lon":{"anyOf":[{"maximum":180,"minimum":-180,"type":"number"},{"type":"null"}],"default":null,"description":"Optional longitude; give with lat.","title":"Lon"},"country_code":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only networks in this ISO 3166-1 alpha-2 country, for example 'CA' or 'US'.","title":"Country Code"},"include_modes":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Also return the modes (bus, subway...) each network runs.","title":"Include Modes"},"include_all_networks":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Also include beta networks such as previews of agency redesigns.","title":"Include All Networks"},"include_network_geometry":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Include the GeoJSON area of each network (very large); leave false.","title":"Include Network Geometry"}},"title":"list_available_networksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_stops":{"post":{"operationId":"search_stops","summary":"Search transit stops by name or stop code near an approximate location; returns the best matches with ids and coordinate","description":"Search transit stops by name or stop code near an approximate location; returns the best matches with ids and coordinates. Use for \"Find the transit stop named 'Berri' near downtown Montreal\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Stop name or stop code to look for.","maxLength":100,"title":"Query","type":"string"},"lat":{"anyOf":[{"maximum":90,"minimum":-90,"type":"number"},{"type":"null"}],"default":null,"description":"Optional latitude; give with lon to narrow the answer to services around that point.","title":"Lat"},"lon":{"anyOf":[{"maximum":180,"minimum":-180,"type":"number"},{"type":"null"}],"default":null,"description":"Optional longitude; give with lat.","title":"Lon"},"max_num_results":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many matches to return (1 to 50).","title":"Max Num Results"},"max_distance":{"anyOf":[{"maximum":100000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only stops within this many metres of lat/lon.","title":"Max Distance"}},"required":["query"],"title":"search_stopsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_nearby_stops":{"post":{"operationId":"list_nearby_stops","summary":"List transit stops around a location with distance, code, coordinates, mode and wheelchair boarding info. Use for \"What ","description":"List transit stops around a location with distance, code, coordinates, mode and wheelchair boarding info. Use for \"What transit stops are within 300 metres of 45.5231, -73.5964\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"description":"Latitude of the point, decimal degrees.","maximum":90,"minimum":-90,"title":"Lat","type":"number"},"lon":{"description":"Longitude of the point, decimal degrees.","maximum":180,"minimum":-180,"title":"Lon","type":"number"},"max_distance":{"anyOf":[{"maximum":1500,"minimum":1,"type":"integer"},{"type":"null"}],"default":300,"description":"Search radius in metres (up to 1500).","title":"Max Distance"},"stop_filter":{"anyOf":[{"enum":["Routable","EntrancesAndStopsOutsideStations","Entrances","Any"],"type":"string"},{"type":"null"}],"default":"Routable","description":"Which stop kinds to return.","title":"Stop Filter"}},"required":["lat","lon"],"title":"list_nearby_stopsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_stop_details":{"post":{"operationId":"get_stop_details","summary":"Get one transit stop: name, code, coordinates, timezone, city, network and wheelchair boarding. Use for \"Tell me about t","description":"Get one transit stop: name, code, coordinates, timezone, city, network and wheelchair boarding. Use for \"Tell me about transit stop STM:88368\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"global_stop_id":{"description":"Transit global stop id such as 'STM:88368', from nearby_stops or search_stops.","maxLength":200,"title":"Global Stop Id","type":"string"}},"required":["global_stop_id"],"title":"get_stop_detailsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_nearby_routes":{"post":{"operationId":"list_nearby_routes","summary":"List transit routes serving a location with their mode, network and the next departures of each direction. Use for \"Whic","description":"List transit routes serving a location with their mode, network and the next departures of each direction. Use for \"Which bus and metro routes serve 45.5231, -73.5964 and when is the next departure\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"description":"Latitude of the point, decimal degrees.","maximum":90,"minimum":-90,"title":"Lat","type":"number"},"lon":{"description":"Longitude of the point, decimal degrees.","maximum":180,"minimum":-180,"title":"Lon","type":"number"},"max_distance":{"anyOf":[{"maximum":1500,"minimum":1,"type":"integer"},{"type":"null"}],"default":300,"description":"Search radius in metres (up to 1500).","title":"Max Distance"},"max_num_departures":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"How many upcoming departures to return per itinerary (1 to 10).","title":"Max Num Departures"},"should_update_realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Use live data where available.","title":"Should Update Realtime"}},"required":["lat","lon"],"title":"list_nearby_routesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_stop_departures":{"post":{"operationId":"get_stop_departures","summary":"Get upcoming departures at one or more stops for every route that serves them, with live times where the agency provides","description":"Get upcoming departures at one or more stops for every route that serves them, with live times where the agency provides them. Use for \"When are the next buses at transit stop STM:88368\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"global_stop_ids":{"description":"One global stop id or several separated by commas (for example 'STM:88368,STM:88369').","maxLength":500,"title":"Global Stop Ids","type":"string"},"max_num_departures":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"How many upcoming departures to return per itinerary (1 to 10).","title":"Max Num Departures"},"remove_cancelled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"Leave out cancelled departures.","title":"Remove Cancelled"},"should_update_realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Use live data where available.","title":"Should Update Realtime"},"time":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Unix timestamp (seconds) to look up departures for; defaults to now.","title":"Time"}},"required":["global_stop_ids"],"title":"get_stop_departuresArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_route_details":{"post":{"operationId":"get_route_details","summary":"Get one route with its directions, headsigns and ordered stop lists (no map shapes). Use for \"Which stops does Transit r","description":"Get one route with its directions, headsigns and ordered stop lists (no map shapes). Use for \"Which stops does Transit route STM:897 serve in each direction\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"global_route_id":{"description":"Transit global route id such as 'STM:897', from nearby_routes or stop departures.","maxLength":200,"title":"Global Route Id","type":"string"}},"required":["global_route_id"],"title":"get_route_detailsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_vehicles":{"post":{"operationId":"list_vehicles","summary":"Get live vehicle positions (coordinates, occupancy, wheelchair access, last update) for a route, where the agency publis","description":"Get live vehicle positions (coordinates, occupancy, wheelchair access, last update) for a route, where the agency publishes them. Use for \"Where are the vehicles of Transit route STM:897 right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"global_route_id":{"description":"Transit global route id such as 'STM:897', from nearby_routes or stop departures.","maxLength":200,"title":"Global Route Id","type":"string"},"direction_id":{"anyOf":[{"maximum":1,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Only one direction: 0 (outbound) or 1 (inbound).","title":"Direction Id"}},"required":["global_route_id"],"title":"list_vehiclesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_service_alerts":{"post":{"operationId":"list_service_alerts","summary":"List service alerts (detours, disruptions, closures) for one or more transit networks, with cause, effect, severity, act","description":"List service alerts (detours, disruptions, closures) for one or more transit networks, with cause, effect, severity, active periods and affected routes and stops. Use for \"Are there any service alerts on the STM network\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"network_ids":{"description":"Network ids separated by commas, from list_available_networks.","maxLength":500,"title":"Network Ids","type":"string"},"lat":{"anyOf":[{"maximum":90,"minimum":-90,"type":"number"},{"type":"null"}],"default":null,"description":"Optional latitude; give with lon to narrow the answer to services around that point.","title":"Lat"},"lon":{"anyOf":[{"maximum":180,"minimum":-180,"type":"number"},{"type":"null"}],"default":null,"description":"Optional longitude; give with lat.","title":"Lon"},"show_active_alerts_only":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"Only alerts that are active right now.","title":"Show Active Alerts Only"}},"required":["network_ids"],"title":"list_service_alertsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_network_latest_update":{"post":{"operationId":"get_network_latest_update","summary":"Get the time of the most recent schedule data update Transit has for a network. Use for \"When was the STM network data l","description":"Get the time of the most recent schedule data update Transit has for a network. Use for \"When was the STM network data last updated in Transit\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"network_id":{"description":"Network id, from list_available_networks.","maxLength":200,"title":"Network Id","type":"string"},"lat":{"anyOf":[{"maximum":90,"minimum":-90,"type":"number"},{"type":"null"}],"default":null,"description":"Optional latitude; give with lon to narrow the answer to services around that point.","title":"Lat"},"lon":{"anyOf":[{"maximum":180,"minimum":-180,"type":"number"},{"type":"null"}],"default":null,"description":"Optional longitude; give with lat.","title":"Lon"}},"required":["network_id"],"title":"get_network_latest_updateArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/plan_trip":{"post":{"operationId":"plan_trip","summary":"Plan a public transit trip between two coordinates or stops and return the best few options with duration, start and end","description":"Plan a public transit trip between two coordinates or stops and return the best few options with duration, start and end times, fare and legs. Use for \"How do I get from 45.5231, -73.5964 to 45.5017, -73.5673 by transit\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_lat":{"description":"Origin latitude.","maximum":90,"minimum":-90,"title":"From Lat","type":"number"},"from_lon":{"description":"Origin longitude.","maximum":180,"minimum":-180,"title":"From Lon","type":"number"},"to_lat":{"description":"Destination latitude.","maximum":90,"minimum":-90,"title":"To Lat","type":"number"},"to_lon":{"description":"Destination longitude.","maximum":180,"minimum":-180,"title":"To Lon","type":"number"},"mode":{"anyOf":[{"enum":["transit","microtransit","personal_bike","walk","shared_mobility"],"type":"string"},{"type":"null"}],"default":"transit","description":"Main travel mode.","title":"Mode"},"leave_time":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Unix timestamp (seconds) to leave at; defaults to now. Use either this or arrival_time.","title":"Leave Time"},"arrival_time":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Unix timestamp (seconds) to arrive by.","title":"Arrival Time"},"accessibility_need":{"anyOf":[{"enum":["none","strict","prioritize_step_free"],"type":"string"},{"type":"null"}],"default":"none","description":"Wheelchair needs.","title":"Accessibility Need"},"num_result":{"anyOf":[{"maximum":5,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"How many options to return (1 to 5).","title":"Num Result"}},"required":["from_lat","from_lon","to_lat","to_lon"],"title":"plan_tripArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_nearby_shared_vehicles":{"post":{"operationId":"list_nearby_shared_vehicles","summary":"List shared bikes, e-bikes, scooters and docking stations around a location with network, availability text and coordina","description":"List shared bikes, e-bikes, scooters and docking stations around a location with network, availability text and coordinates. Use for \"Are there shared bikes or scooters near 45.5231, -73.5964\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"description":"Latitude of the point, decimal degrees.","maximum":90,"minimum":-90,"title":"Lat","type":"number"},"lon":{"description":"Longitude of the point, decimal degrees.","maximum":180,"minimum":-180,"title":"Lon","type":"number"},"distance":{"anyOf":[{"maximum":1500,"minimum":1,"type":"integer"},{"type":"null"}],"default":300,"description":"Search radius in metres.","title":"Distance"}},"required":["lat","lon"],"title":"list_nearby_shared_vehiclesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}