Repository navigation
fix(location-grounding): correct what ground_location_tool actually returns - #81
Open
mattpodwysocki wants to merge 1 commit into
Open
mattpodwysocki wants to merge 1 commit into
mattpodwysocki wants to merge 1 commit into
Conversation
…eturns The skill told models that ground_location_tool returns "ratings, price levels, and popularity (when available)" and that place_details_tool is "already composed inside this tool" so it should not be called separately. Neither is true. GroundLocationOutputSchema's PoiSchema defines only name, address, longitude, latitude, category, and distance_meters -- no rating, price, or popularity field exists -- and the tool makes no Place Details call. Verified against a live ground_location_tool call, which returns none of them. The net effect was that a model following this skill would be told enrichment had already happened, find no ratings in the result, and be left to fill the gap from training data -- the exact failure the skill exists to prevent. Corrected: - The Returns list now describes the real payload, including the mapbox_id and external_ids now threaded through per POI, and the map render reference rather than a "static map image" the tool never returned. - The "do not call separately" instruction now covers only the three tools actually composed inside (reverse_geocode, category_search, isochrone), with place_details_tool called out as the deliberate exception and shown as an explicit follow-up step. - Two caveats added to that step: a POI without a mapbox_id cannot be enriched, and an OpenStreetMap-sourced id (urn:mbxpoi-osm:) is rejected by the details endpoint. Both say to describe the place from the grounding data rather than from training data. - Three other passages that credited ratings and prices to the wrong tool are now consistent with the above: the query-parameter guidance, the grounded-response template, and the anti-patterns list. The enrichment step is written to degrade safely: before mapbox_id is present on nearby_pois it simply finds nothing to enrich, and becomes fully correct once mapbox/mcp-server#263 lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
mapbox-location-groundingskill made two claims aboutground_location_toolthat are not true:GroundLocationOutputSchema'sPoiSchemadefines onlyname,address,longitude,latitude,category, anddistance_meters. No rating, price, or popularity field exists, and the tool makes no Place Details call at any point. It also claimed to return "a static map image", where it actually returns amapboxRenderreference.Why it matters: a model following this skill is told enrichment has already happened, finds no ratings in the result, and is left to fill the gap — from training data, which is the precise failure this skill exists to prevent. The skill's own anti-pattern list says "Hallucinating business names, hours, or ratings" two screens below the instruction that sets that up.
What changed
mapbox_id/external_idsper POI and the map render reference.reverse_geocode_tool,category_search_tool,isochrone_tool), withplace_details_toolcalled out as the deliberate exception and given an explicit follow-up step.mapbox_idcan't be enriched, and an OpenStreetMap-sourced id (decodes tourn:mbxpoi-osm:rather thanurn:mbxpoi:) is rejected by the details endpoint. Both instruct the model to describe the place from the grounding data rather than from training data.Type of Change
Skill Details
Skill name:
mapbox-location-groundingWhat domain expertise does this skill provide?
Composing Mapbox MCP tools into grounded, cited location answers instead of answering from training data.
When should this skill be used?
"What's near X?", neighborhood/area description, and travel-time questions — anywhere place accuracy or recency matters.
Testing
Local validation:
npm run checkpassesAI assistant testing:
Testing evidence:
The claims were checked against a live
ground_location_toolcall throughmcp.mapbox.com, not against documentation. Grounding on Anacostia Park, DC returned:{ "place": "Anacostia Park", "nearby_pois": [ { "name": "Grounded: Plant Shop, Cafe, & Wellness Studio", "address": "1913 Martin Luther King Jr Ave SE, Washington, DC 20020", "longitude": -76.98891203, "latitude": 38.86712324, "category": "café", "distance_meters": 253 } ], "isochrone": { "profile": "mapbox/walking", "contours_minutes": [15, 10, 5] }, "citations": ["Mapbox Geocoding API", "Mapbox Isochrone API", "Mapbox Search API"] }No
rating,price,popularity, or hours on any POI, and no Place Details request in the call.npm run checkoutput ends✅ All skills are valid.Checklist
cspell.config.json—mbxpoiAdditional Notes
Merge order is not a blocker, but worth knowing. The enrichment step tells the model to take
mapbox_idoff each POI.ground_location_tooldoesn't returnmapbox_idtoday — mapbox/mcp-server#263 adds it. I wrote the step to degrade safely rather than gate this PR on that one: before #263 lands, a model following it finds no ids and simply skips enrichment, which is the correct behavior anyway, and the "cannot be enriched → don't invent it" caveat covers that case explicitly. After #263, it works as written.Everything else here — the false "already composed inside" claim, the non-existent ratings/price/popularity fields, the static map image — is wrong today and independent of #263.
Not addressed here: whether
ground_location_toolshould compose Place Details server-side so the original claim becomes true. That's a real option now that mapbox/mcp-server#262 has built batched Place Details enrichment for the render panel, but it's a design call for that repo, and it would change this tool's latency and cost profile. This PR makes the skill match the tool as it is.🤖 Generated with Claude Code