{"openapi":"3.1.0","info":{"title":"SF Bay 511 (BYOK) API","version":"0.1.0","description":"SF Bay 511 (BYOK) lets an AI assistant read your own SF Bay 511 data through the SF Bay 511 API with a key you supply (API key). Read-only: 12 tools (list_transit_operators, list_gtfs_feeds, list_transit_lines, list_transit_stops, get_line_timetable, list_transit_holidays, get_stop_arrivals, get_scheduled_departures, list_service_alerts, list_traffic_events, list_work_zones, list_toll_programs)....\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-sf-bay-511.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-sf-bay-511/docs"},"termsOfService":"https://connectorbay.com/byok-sf-bay-511/terms"},"servers":[{"url":"https://byok-sf-bay-511.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-sf-bay-511/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_transit_operators":{"post":{"operationId":"list_transit_operators","summary":"List the Bay Area transit operators (agencies): id, name, short name, primary mode, time zone, website and whether live ","description":"List the Bay Area transit operators (agencies): id, name, short name, primary mode, time zone, website and whether live data is monitored. Operator ids are used by the other transit tools. Use for \"Which transit operators does 511 cover in the Bay Area\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_id":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only this operator code, for example BA.","title":"Operator Id"}},"title":"list_transit_operatorsArguments","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_gtfs_feeds":{"post":{"operationId":"list_gtfs_feeds","summary":"List the operators that publish a GTFS schedule feed through 511, with the time each feed was last generated. The id RG ","description":"List the operators that publish a GTFS schedule feed through 511, with the time each feed was last generated. The id RG is the regional combined feed. Use for \"Which Bay Area GTFS feeds are available and when were they last updated\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_gtfs_feedsArguments","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_transit_lines":{"post":{"operationId":"list_transit_lines","summary":"List the lines (routes) of one operator with id, name, transport mode and whether real-time data is monitored. Use for \"","description":"List the lines (routes) of one operator with id, name, transport mode and whether real-time data is monitored. Use for \"Which lines does Muni run\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_id":{"description":"Transit operator code such as SF (Muni), BA (BART), AC (AC Transit), CT (Caltrain). List them with list_transit_operators.","maxLength":10,"title":"Operator Id","type":"string"},"line_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this line id.","title":"Line Id"}},"required":["operator_id"],"title":"list_transit_linesArguments","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_transit_stops":{"post":{"operationId":"list_transit_stops","summary":"List the stops of one operator, optionally for one line, direction or pattern, with id, name, location, stop type, platf","description":"List the stops of one operator, optionally for one line, direction or pattern, with id, name, location, stop type, platform code and parent station. Large operators return a lot of data; narrow with the optional filters when offered. Use for \"Which stops does Muni line 38 serve\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_id":{"description":"Transit operator code such as SF (Muni), BA (BART), AC (AC Transit), CT (Caltrain). List them with list_transit_operators.","maxLength":10,"title":"Operator Id","type":"string"},"line_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Line (route) id as returned by list_transit_lines, for example 38 or BA:BAY PT/SFIA.","title":"Line Id"},"direction_id":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Direction id from the pattern data (needs line_id).","title":"Direction Id"},"pattern_id":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only the stops of this journey pattern id.","title":"Pattern Id"},"include_stop_areas":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to also return stop areas (groupings of stops).","title":"Include Stop Areas"}},"required":["operator_id"],"title":"list_transit_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_line_timetable":{"post":{"operationId":"get_line_timetable","summary":"Get the scheduled timetables of one line: day types, trips and passing times, optionally the holiday or special service ","description":"Get the scheduled timetables of one line: day types, trips and passing times, optionally the holiday or special service for one exception date. Large operators return a lot of data; narrow with the optional filters when offered. Use for \"What is the timetable of BART line COLS/OAKL\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_id":{"description":"Transit operator code such as SF (Muni), BA (BART), AC (AC Transit), CT (Caltrain). List them with list_transit_operators.","maxLength":10,"title":"Operator Id","type":"string"},"line_id":{"description":"Line (route) id as returned by list_transit_lines, for example 38 or BA:BAY PT/SFIA.","maxLength":60,"title":"Line Id","type":"string"},"include_special_service":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to return the special or holiday timetables instead of the regular ones.","title":"Include Special Service"},"exception_date":{"anyOf":[{"maxLength":8,"type":"string"},{"type":"null"}],"default":null,"description":"A holiday date as YYYYMMDD (from list_transit_holidays): returns the timetable for that date.","title":"Exception Date"},"include_day_type_assignments":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include the day type assignment of each date.","title":"Include Day Type Assignments"}},"required":["operator_id","line_id"],"title":"get_line_timetableArguments","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_transit_holidays":{"post":{"operationId":"list_transit_holidays","summary":"List the service exception dates (holidays) of one operator with their start and end times; use them with get_line_timet","description":"List the service exception dates (holidays) of one operator with their start and end times; use them with get_line_timetable. Use for \"Which holidays change Muni service\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_id":{"description":"Transit operator code such as SF (Muni), BA (BART), AC (AC Transit), CT (Caltrain). List them with list_transit_operators.","maxLength":10,"title":"Operator Id","type":"string"}},"required":["operator_id"],"title":"list_transit_holidaysArguments","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_arrivals":{"post":{"operationId":"get_stop_arrivals","summary":"Get the live predicted arrivals and departures at one stop in SIRI format: line, direction, destination, expected and ai","description":"Get the live predicted arrivals and departures at one stop in SIRI format: line, direction, destination, expected and aimed times. Use for \"When is the next vehicle at Muni stop 13008\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"agency":{"description":"Operator code such as SF, BA or AC.","maxLength":10,"title":"Agency","type":"string"},"stop_code":{"description":"Stop code of the stop (or parent station) to monitor. Always give one: without it the answer covers every stop of the agency.","maxLength":20,"title":"Stop Code","type":"string"}},"required":["agency","stop_code"],"title":"get_stop_arrivalsArguments","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_scheduled_departures":{"post":{"operationId":"get_scheduled_departures","summary":"Get the scheduled departures at one stop for one operator, optionally for one line and a time window (SIRI stop timetabl","description":"Get the scheduled departures at one stop for one operator, optionally for one line and a time window (SIRI stop timetable). Use for \"What are the scheduled departures at Muni stop 13008\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"operator_ref":{"description":"Operator code such as SF.","maxLength":10,"title":"Operator Ref","type":"string"},"monitoring_ref":{"description":"Stop code of the stop or platform.","maxLength":20,"title":"Monitoring Ref","type":"string"},"line_ref":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only this line (route code).","title":"Line Ref"},"start_time":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Start of the departure window as an ISO 8601 date and time.","title":"Start Time"},"end_time":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"End of the departure window as an ISO 8601 date and time.","title":"End Time"}},"required":["operator_ref","monitoring_ref"],"title":"get_scheduled_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/list_service_alerts":{"post":{"operationId":"list_service_alerts","summary":"List the current transit service alerts (GTFS-realtime format) for one operator or the whole region: affected agency, ca","description":"List the current transit service alerts (GTFS-realtime format) for one operator or the whole region: affected agency, cause, effect, active period and text. Use for \"Are there any Muni service alerts\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"agency":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":"RG","description":"Operator code such as SF or BA; RG (the default) for the whole region.","title":"Agency"},"answer_format":{"anyOf":[{"const":"json","type":"string"},{"type":"null"}],"default":"json","description":"Fixed: asks for JSON. Leave at the default.","title":"Answer Format"}},"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/list_traffic_events":{"post":{"operationId":"list_traffic_events","summary":"List current Bay Area traffic events (incidents, road works, special events) from CHP and Caltrans: headline, type, seve","description":"List current Bay Area traffic events (incidents, road works, special events) from CHP and Caltrans: headline, type, severity, roads, lane status and location. Use for \"Are there any active traffic incidents on the Bay Area roads\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"status":{"anyOf":[{"enum":["ACTIVE","ARCHIVED","ALL"],"type":"string"},{"type":"null"}],"default":"ACTIVE","description":"ACTIVE (default), ARCHIVED or ALL.","title":"Status"},"event_type":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Event type such as INCIDENT, CONSTRUCTION or SPECIAL_EVENT (comma separated for several).","title":"Event Type"},"severity":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Severity filter such as MINOR, MODERATE, MAJOR (comma separated for several).","title":"Severity"},"road_name":{"anyOf":[{"maxLength":80,"type":"string"},{"type":"null"}],"default":null,"description":"Only events on this road, an exact case-sensitive name such as I-80 (comma separated for several).","title":"Road Name"},"limit":{"anyOf":[{"maximum":500,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Maximum number of events per page (the service allows at least 500).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Number of events to skip, for paging.","title":"Offset"}},"title":"list_traffic_eventsArguments","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_work_zones":{"post":{"operationId":"list_work_zones","summary":"List active Bay Area road work zones in the USDOT WZDx format: road names, direction, event dates, vehicle impact and de","description":"List active Bay Area road work zones in the USDOT WZDx format: road names, direction, event dates, vehicle impact and description. Use for \"Which road work zones are active in the Bay Area\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"all_active_and_future_events":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include scheduled future work zones as well as active ones.","title":"All Active And Future Events"}},"title":"list_work_zonesArguments","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_toll_programs":{"post":{"operationId":"list_toll_programs","summary":"List the Bay Area toll programs with their toll signs, destinations and current toll prices (express lanes and bridges).","description":"List the Bay Area toll programs with their toll signs, destinations and current toll prices (express lanes and bridges). Use for \"What are the current express lane toll prices in the Bay Area\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"jurisdiction":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only toll programs of this jurisdiction id, for example 511.org.","title":"Jurisdiction"}},"title":"list_toll_programsArguments","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}}}}