feat: add place search and routing tools

Add search_places and places_nearby over the app's Google Places routes,
and plan_route over its OpenStreetMap routing. The place search service
reports when no search key is configured, so an unconfigured server is
not mistaken for an empty result, and rate limits become retry_later.
Route endpoints accept a place name or coordinates.
This commit is contained in:
Sameh Khamis committed 2026-10-01 12:16:01 -07:00
1 parent 85fee59da1
commit e680a59bf5
14 files changed
+596 -23

No files matched your search

+3 -2
View File
@@ -7,8 +7,9 @@ and `gods-eye-view/tools/mcp` exposes a composed catalog over the Model Context
Protocol. `npm run mcp` serves Core's tools over stdio to a local MCP client,
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) and satellites (next
pass over a point, and those overhead now). Tools reuse the layers' portable source factories, take a
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
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).
+6 -1
View File
@@ -49,7 +49,9 @@ 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`.
`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`.
## The `area` argument
@@ -98,3 +100,6 @@ public feeds the sources already use.
| `find_cctv_cameras` | `cctv` | Public cameras in an area, nearest first |
| `get_cctv_snapshot` | `cctv` | The current image from one camera, returned as image content |
| `find_radio_stations` | `radio` | Radio Browser stations by area and/or search terms, with stream URLs |
| `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 |