Skip to content

Restore base64 image output in static_map_image_tool#120

Merged
mattpodwysocki merged 1 commit intomainfrom
restore-base64-static-map
Feb 23, 2026
Merged

Restore base64 image output in static_map_image_tool#120
mattpodwysocki merged 1 commit intomainfrom
restore-base64-static-map

Conversation

@mattpodwysocki
Copy link
Contributor

@mattpodwysocki mattpodwysocki commented Feb 23, 2026

Summary

  • Restores fetching and base64-encoding the map image so non-MCP-Apps clients (Goose, plain Claude Desktop, OpenAI, etc.) receive an actual image content block rather than just a URL
  • Keeps the URL as the first text content item so the StaticMapUIResource HTML can still locate it via content.find(c => c.type === 'text')
  • MCP Apps UIResource is preserved at content[2] when MCP-UI is enabled — no change to the interactive map preview experience
  • Removes the Breaking Changes section added in Add MCP Apps support for static_map_image_tool #109 since the original base64 behaviour is now preserved

Content structure after this change:

  • content[0] — URL text (required first for MCP Apps UI)
  • content[1] — base64 image (for non-MCP-Apps clients to see the actual image)
  • content[2] — UIResource (when MCP-UI enabled, for MCP Apps panel rendering)

Test plan

  • All 25 StaticMapImageTool tests pass
  • Without MCP-UI: content length is 2 (URL + image)
  • With MCP-UI enabled (default): content length is 3 (URL + image + UIResource)
  • content[0] is always the URL text so MCP Apps display still works

Screenshots

San Francisco at Zoom Level 12

Screenshot 2026-02-23 at 14 31 42

Full Screen Shot

Screenshot 2026-02-23 at 14 31 52

Raw Image Part of Response

Screenshot 2026-02-23 at 14 34 14

- Restores fetching and base64-encoding the image so non-MCP-Apps
  clients (Goose, plain Claude Desktop, OpenAI, etc.) receive an actual
  image content block rather than just a URL
- Keeps the URL as the first text content item so the StaticMapUIResource
  HTML can still find it via content.find(c => c.type === 'text')
- MCP Apps UIResource remains in content[2] when MCP-UI is enabled
- Removes the Breaking Changes section from CHANGELOG since the
  original base64 behaviour is preserved
- Updates all affected tests (25 passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mattpodwysocki mattpodwysocki requested a review from a team as a code owner February 23, 2026 19:28
@mattpodwysocki mattpodwysocki merged commit b154c8b into main Feb 23, 2026
5 checks passed
@mattpodwysocki mattpodwysocki deleted the restore-base64-static-map branch February 23, 2026 19:49
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.

2 participants