feat: add bike-share and transit tools

Add get_bike_share over the public GBFS systems and get_transit_vehicles
over the GTFS-Realtime feeds. Each finds the systems or feeds whose
coverage reaches the area, reads up to three, and reports any that were
unavailable instead of failing the whole answer. Transit results carry
each feed's attribution and license.
This commit is contained in:
Sameh Khamis committed 2026-10-01 12:22:13 -07:00
1 parent 2ba751ace8
commit 8c97fed92d
10 files changed
+510 -4

No files matched your search

+2 -1
View File
@@ -9,7 +9,8 @@ reading from a running app's `/api` routes (default `http://localhost:4173`).
Queries cover earthquakes, active fires, recent launches, aircraft (in an
area, by identifier, tracks, and type and route lookups), satellites (next
pass over a point, and those overhead now), public cameras (including a
camera's current image), radio stations, place search and routing. Tools reuse the layers' portable source factories, take a
camera's current image), radio stations, place search, routing, bike-share
stations and transit vehicles. Tools reuse the layers' portable source factories, take a
shared `area` argument (place name, bounding box, or point and radius) and cap
lists at 25 rows by default. The app does not import the tools, so its runtime
behavior is unchanged. See [tools and the MCP server](TOOLS.md).
+4 -1
View File
@@ -49,7 +49,8 @@ Services are the portable source factories the layers already use, such as
plus a `places` service with `resolve(name, { signal })`. Sources request
relative `/api/...` paths through an injected `fetchImpl`, so the same tool
code runs wherever an application routes those paths.
`createGeocodePlaceService` resolves place names through `/api/geocode`;
The `bikeshare` service is `{ systems, getStations }`: the system registry and
the GBFS source. `createGeocodePlaceService` resolves place names through `/api/geocode`;
`createPlaceSearchService` searches `/api/google/*` and reports when no search key
is configured; `createRouteService` plans routes through `/api/route`.
@@ -103,3 +104,5 @@ public feeds the sources already use.
| `search_places` | `placeSearch` | Points of interest matching a query within an area (Google Places) |
| `places_nearby` | `placeSearch` | Notable places around a point (Google Places) |
| `plan_route` | `routing` | Walking, driving or cycling route over OpenStreetMap, with a simplified path |
| `get_bike_share` | `bikeshare` | Live GBFS stations in an area, with bikes and docks available |
| `get_transit_vehicles` | `transit` | Live GTFS-Realtime vehicle positions in an area, optionally one route |