{"openapi":"3.1.0","info":{"title":"WMATA (BYOK) API","version":"0.1.0","description":"WMATA (BYOK) lets an AI assistant read your own WMATA data through the WMATA API with a key you supply (WMATA API primary key). Read-only: 12 tools (next_trains, next_buses, bus_positions, list_bus_routes, find_bus_stops, bus_stop_schedule, list_rail_lines, list_rail_stations, get_station_info, rail_station_path, rail_fare_and_time, station_parking). The BYOK key travels with each request, is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-wmata.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-wmata/docs"},"termsOfService":"https://connectorbay.com/byok-wmata/terms"},"servers":[{"url":"https://byok-wmata.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-wmata/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/next_trains":{"post":{"operationId":"next_trains","summary":"Get next Metrorail train arrivals at one or more stations (updated about every 20 to 30 seconds): line, destination, car","description":"Get next Metrorail train arrivals at one or more stations (updated about every 20 to 30 seconds): line, destination, cars and minutes to arrival. Use for \"When is the next train at Metro Center\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"station_codes":{"description":"Comma-separated station codes such as A01,C01, or All for every station.","maxLength":200,"title":"Station Codes","type":"string"}},"required":["station_codes"],"title":"next_trainsArguments","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/next_buses":{"post":{"operationId":"next_buses","summary":"Get the next Metrobus arrivals at a stop: route, direction text, minutes until arrival and vehicle ID. Use for \"When is ","description":"Get the next Metrobus arrivals at a stop: route, direction text, minutes until arrival and vehicle ID. Use for \"When is the next bus at stop 1001195\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"stop_id":{"description":"7-digit regional bus stop ID (find_bus_stops returns them).","maxLength":200,"title":"Stop Id","type":"string"}},"required":["stop_id"],"title":"next_busesArguments","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/bus_positions":{"post":{"operationId":"bus_positions","summary":"Get live Metrobus positions, for one route and/or inside a circle around a point, with schedule deviation in minutes (po","description":"Get live Metrobus positions, for one route and/or inside a circle around a point, with schedule deviation in minutes (positive means late). Use for \"Where are the 70 buses right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"route_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Base bus route such as 70 or 10A.","title":"Route Id"},"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Latitude of the centre point for a bus position search (use together with lon and radius_meters).","title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Longitude of the centre point.","title":"Lon"},"radius_meters":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Search radius in meters around the centre point.","title":"Radius Meters"}},"title":"bus_positionsArguments","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_bus_routes":{"post":{"operationId":"list_bus_routes","summary":"List all Metrobus route variants with route ID, name and line description. Use for \"Which Metrobus routes exist\".","description":"List all Metrobus route variants with route ID, name and line description. Use for \"Which Metrobus routes exist\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_bus_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/find_bus_stops":{"post":{"operationId":"find_bus_stops","summary":"Find Metrobus stops near a point (lat, lon and radius in meters) or list all stops when no point is given. Use for \"Whic","description":"Find Metrobus stops near a point (lat, lon and radius in meters) or list all stops when no point is given. Use for \"Which bus stops are within 300 meters of the Capitol\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Latitude of the centre point for a stop search (use together with lon and radius_meters).","title":"Lat"},"lon":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Longitude of the centre point.","title":"Lon"},"radius_meters":{"anyOf":[{"type":"number"},{"type":"null"}],"default":null,"description":"Search radius in meters around the centre point.","title":"Radius Meters"}},"title":"find_bus_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/bus_stop_schedule":{"post":{"operationId":"bus_stop_schedule","summary":"Get the scheduled Metrobus arrivals at a stop for a date, with route, trip headsign and times. Use for \"What buses are s","description":"Get the scheduled Metrobus arrivals at a stop for a date, with route, trip headsign and times. Use for \"What buses are scheduled at stop 1001195 tomorrow\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"stop_id":{"description":"7-digit regional bus stop ID (find_bus_stops returns them).","maxLength":200,"title":"Stop Id","type":"string"},"date":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Date as YYYY-MM-DD; today when empty.","title":"Date"}},"required":["stop_id"],"title":"bus_stop_scheduleArguments","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_rail_lines":{"post":{"operationId":"list_rail_lines","summary":"List the six Metrorail lines with line code, name, and start and end station codes. Use for \"What Metro lines are there ","description":"List the six Metrorail lines with line code, name, and start and end station codes. Use for \"What Metro lines are there and where do they start and end\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_rail_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_rail_stations":{"post":{"operationId":"list_rail_stations","summary":"List Metrorail stations with code, name, address, coordinates and lines served; optionally only one line. Use for \"Which","description":"List Metrorail stations with code, name, address, coordinates and lines served; optionally only one line. Use for \"Which stations are on the Green line\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"line_code":{"anyOf":[{"enum":["RD","YL","GR","BL","OR","SV"],"type":"string"},{"type":"null"}],"default":null,"description":"Two-letter line code: RD, YL, GR, BL, OR or SV.","title":"Line Code"}},"title":"list_rail_stationsArguments","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_station_info":{"post":{"operationId":"get_station_info","summary":"Get one Metrorail station's name, address, coordinates and lines. Use for \"Where is station B35 and which lines serve it","description":"Get one Metrorail station's name, address, coordinates and lines. Use for \"Where is station B35 and which lines serve it\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"station_code":{"description":"Metrorail station code such as A01 (Metro Center); list_rail_stations gives all codes.","maxLength":200,"title":"Station Code","type":"string"}},"required":["station_code"],"title":"get_station_infoArguments","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/rail_station_path":{"post":{"operationId":"rail_station_path","summary":"List the ordered stations and distances in feet between two stations on the same Metrorail line. Use for \"Which stations","description":"List the ordered stations and distances in feet between two stations on the same Metrorail line. Use for \"Which stations lie between Metro Center and Union Station\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_station_code":{"description":"Origin station code.","maxLength":200,"title":"From Station Code","type":"string"},"to_station_code":{"description":"Destination station code (same line as the origin).","maxLength":200,"title":"To Station Code","type":"string"}},"required":["from_station_code","to_station_code"],"title":"rail_station_pathArguments","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/rail_fare_and_time":{"post":{"operationId":"rail_fare_and_time","summary":"Get distance, fare (peak, off-peak, senior/disabled) and scheduled travel time between two Metrorail stations, or for al","description":"Get distance, fare (peak, off-peak, senior/disabled) and scheduled travel time between two Metrorail stations, or for all pairs when both are left empty. Use for \"How much is the fare from Metro Center to Dupont Circle\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_station_code":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Origin station code.","title":"From Station Code"},"to_station_code":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Destination station code.","title":"To Station Code"}},"title":"rail_fare_and_timeArguments","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/station_parking":{"post":{"operationId":"station_parking","summary":"Get parking information at Metrorail stations: all-day and short-term spot counts and costs. Use for \"How much does park","description":"Get parking information at Metrorail stations: all-day and short-term spot counts and costs. Use for \"How much does parking cost at Shady Grove\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"station_code":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Metrorail station code such as A01; leave empty for all stations.","title":"Station Code"}},"title":"station_parkingArguments","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}}}}