Skip to content

feat: search_and_geocode/category_search app tools#192

Open
mattpodwysocki wants to merge 3 commits into
feat/optimization-app-toolfrom
feat/search-app-tools
Open

feat: search_and_geocode/category_search app tools#192
mattpodwysocki wants to merge 3 commits into
feat/optimization-app-toolfrom
feat/search-app-tools

Conversation

@mattpodwysocki
Copy link
Copy Markdown
Contributor

Summary

Fourth tool(s) in the MCP Apps pattern series. Two tools — `search_and_geocode_app_tool` (free-text) and `category_search_app_tool` (category-filtered) — share a single `SearchAppUIResource` (`ui://mapbox/search-app/index.html`) that drops numbered pins on the map, each with a popup showing name, address (if available), category (if available), and coordinates. If `proximity` is provided, a small dark "you are here" dot is also placed on the map.

Hits the Search Box API (`/search/searchbox/v1/forward` and `/search/searchbox/v1/category/{cat}`).

Why share one resource

The result shape from both APIs is identical: a FeatureCollection of POIs. The visualization is identical. Sharing the resource keeps the iframe HTML in one place and any future polish (clustering at low zoom, list panel on the side, etc.) applies to both tools.

Stacked on #191

Targets `feat/optimization-app-tool` because it relies on the shared infrastructure landed in #189 (public-token resolver, MCP Apps resource pattern). Will retarget to main after the upstream stack merges.

Test plan

  • 7 new tests (6 tool, 1 resource): both tools' URL construction, payload shape, resource sharing, empty results, API error
  • Full suite: 751 tests passing across 63 files
  • Build, lint, format clean

🤖 Generated with Claude Code

Fourth in the MCP Apps series. Two tools — free-text search and
category-filtered search — share a single SearchAppUIResource that
drops numbered pins with popups (name, address, category, coordinates)
for each result. When proximity is provided, a small dark dot also
shows on the map as "you are here" context.

The two tools share the same MCP App resource because their result
shape is identical; only the API endpoint and bias parameters differ.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mattpodwysocki and others added 2 commits May 27, 2026 11:43
Same pattern. Handles both the single-result flyTo path and the
multi-result fitBounds path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant