Repository navigation
fix: steer map display to render_map_tool via server instructions - #269
Merged
Merged
Conversation
Hosts that load tools lazily (Claude Desktop) list only tool names, so a model asked to show a map picked static_map_image_tool by name and never saw render_map_tool's description. Add server instructions routing map display to render_map_tool (refs passed unchanged), and point static_map_image_tool's description and the mapboxRender hint at render_map_tool too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jussi-sa
previously approved these changes
Oct 7, 2026
…-tool # Conflicts: # CHANGELOG.md # src/index.ts
jussi-sa
approved these changes
Oct 8, 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.
Problem
In Claude Desktop, after a successful
isochrone_toolcall, the model loadedstatic_map_image_toolto show the result and never loadedrender_map_tool. When asked why, the model said it had loadedstatic_map_image_tool"because the name looked like the right fit for 'show a map'" and never sawrender_map_tool's description.Cause
Claude Desktop lists only tool names until the model loads a tool.
render_map_tool's description says "ALWAYS use this tool to display maps", but nothing the model could see before choosing said so.Fix
Server instructions: the server now returns MCP
instructionsfrominitialize, which hosts show up front:render_map_toolto show anything on a map;mapboxRender.refvalues unchanged and never write one by hand (this also targets the ChatGPT cause behind fix(render_map_tool): reject isochrone selffetch refs without contours #267);static_map_image_toolonly when the user explicitly asks for an image file.The instructions name only enabled tools, and are omitted when
render_map_toolis disabled.static_map_image_tooldescription: now says to userender_map_toolto show a map.Hint on tool results: the hint appended to results that carry a
mapboxRender.refnow namesrender_map_tooloverstatic_map_image_tooland says to pass the ref unchanged.Testing
static_map_image_tool, and withoutrender_map_tool.initializereturns the instructions, andtools/listshows the updatedstatic_map_image_tooldescription.🤖 Generated with Claude Code