You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
render_map_tool: click a place to ask the model about it #284
The map is display only. A user who sees a place on it has to type a follow-up ("how do I get to the second one?") instead of acting on it from the map.
Proposal
Clicking a pin, a results row or a basemap POI offers a few actions:
Directions here
Tell me more
What's nearby
Each one sends a follow-up message to the chat through the MCP Apps host API (in ChatGPT, the Apps SDK equivalent). The message carries the place's name and mapbox_id, so the model can call place_details_tool, directions_tool and so on with no guessing.
Notes
Host support: check that each host supports sending a message from the page. If it doesn't, fall back to just the popup.
Keep it small: a short action list in the popup, not a new panel.
Use Standard featuresets. We're on Standard, so use map.addInteraction with the built-in poi, buildings and place-labels featuresets instead of raw queryRenderedFeatures against layer ids, which change between style versions. A click on any café gives its name, class and coordinates. Check whether the POI carries an id place_details_tool accepts. If it doesn't, fall back to a search by name and coordinates.
Hover highlight. Featuresets support feature state, so hovering a POI or building can highlight it. That shows people the map is clickable.
What's in view. Query the rendered POIs or roads in the viewport and send a short summary as model context (render_map_tool: tell the model what the user did on the map #287), e.g. "map shows downtown Oakland, 14 cafés visible". Keep it small: counts and a few names, never geometry.
Feature querying only sees what's rendered. For questions about places off screen or not loaded, tilequery (#289) is the server-side option.
Activity
mattpodwysocki commentedon Oct 19, 2026
How to do the "basemap POI" part: feature querying in GL JS.
map.addInteractionwith the built-inpoi,buildingsandplace-labelsfeaturesets instead of rawqueryRenderedFeaturesagainst layer ids, which change between style versions. A click on any café gives its name, class and coordinates. Check whether the POI carries an idplace_details_toolaccepts. If it doesn't, fall back to a search by name and coordinates.Optional extras that use the same mechanism:
Feature querying only sees what's rendered. For questions about places off screen or not loaded, tilequery (#289) is the server-side option.