Skip to content

feat: add maps_static_map tool — inline map images#49

Merged
cablate merged 5 commits intofeat/air-qualityfrom
feat/static-map
Mar 16, 2026
Merged

feat: add maps_static_map tool — inline map images#49
cablate merged 5 commits intofeat/air-qualityfrom
feat/static-map

Conversation

@cablate
Copy link
Owner

@cablate cablate commented Mar 16, 2026

Summary

  • New maps_static_map tool — generates PNG map images returned as MCP image content
  • Users see the map directly in chat (Claude Desktop, Cursor, etc.)
  • Supports markers, paths/routes, 4 map types (roadmap, satellite, terrain, hybrid)
  • Auto-fit zoom when center omitted but markers/path provided
  • All 9 files synced per Tool Change Checklist (14 → 15 tools)

Stacked on #48 (air_quality). Merge #48 first, then this PR.

API

  • Endpoint: GET https://maps.googleapis.com/maps/api/staticmap
  • Price: 10,000/mo free, then $2/1000
  • Prerequisite: Static Maps API enabled in Google Cloud Console

Test evidence

exec static-map '{"center":"Tokyo Tower","zoom":14}' → 96KB PNG
exec static-map '{"markers":["color:red|label:A|35.6586,139.7454","color:blue|label:B|35.6595,139.7006"]}' → 108KB PNG  
exec static-map '{"center":"35.6586,139.7454","zoom":18,"maptype":"satellite"}' → 187KB PNG

Test plan

  • npm run build passes
  • exec static-map returns valid PNG base64
  • Markers and path rendering work
  • satellite/terrain/hybrid views work
  • smoke test expectedTools includes maps_static_map
  • README tool count updated to 15

🤖 Generated with Claude Code

cablate and others added 5 commits March 16, 2026 19:32
- New tool: maps_static_map returns PNG map as MCP image content
- Supports markers, paths, 4 map types (roadmap/satellite/terrain/hybrid)
- Auto-fit zoom when markers/path provided without explicit zoom
- URL length validation (16,384 char limit)
- All 9 files synced per Tool Change Checklist (14 → 15 tools)
- Added Visualization category to SKILL.md Tool Map
- Added chaining patterns: search→map, directions→map

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Batch Geocode:
- New `batch-geocode` CLI subcommand: reads addresses from file, geocodes in parallel
- Configurable concurrency (default 20, max 50)
- Supports stdin input (`-i -`) and file output (`-o results.json`)

MCP Prompt Templates:
- 3 geo prompts: travel-planner, neighborhood-scout, route-optimizer
- Registered via McpServer.registerPrompt() — auto-discovers prompts capability
- Each prompt returns structured messages teaching AI how to chain geo tools
- Available as `/` commands in Claude Desktop and compatible clients

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…s it

Prompts primitive is only supported by Claude Desktop, not Cursor/VS Code/most
clients. The existing SKILL.md Scenario Recipes already serve the same purpose.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Air quality: MCP tool call + exec mode (Tokyo AQI)
- Static map: MCP tool call (image content type, PNG, base64) + exec mode
- Batch geocode: CLI subcommand with temp file (2 addresses)
- Total: 118 assertions (was ~100)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… one call

- New tool: maps_batch_geocode with addresses[] param (max 50)
- Parallel geocoding with per-address error handling
- Returns { total, succeeded, failed, results[] }
- Full test coverage: MCP tool call + exec mode + registration
- All 9 files synced per Tool Change Checklist (15 → 16 tools)
- 125 smoke test assertions, 0 failures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cablate cablate merged commit bbab8bf into feat/air-quality Mar 16, 2026
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