Skip to content

feat: add batch geocode CLI + MCP tool, tests for new tools#50

Merged
cablate merged 5 commits intomainfrom
feat/batch-geocode
Mar 16, 2026
Merged

feat: add batch geocode CLI + MCP tool, tests for new tools#50
cablate merged 5 commits intomainfrom
feat/batch-geocode

Conversation

@cablate
Copy link
Owner

@cablate cablate commented Mar 16, 2026

Summary

  • Batch Geocode CLI: batch-geocode -i addresses.txt -o results.json — geocode hundreds of addresses from file, configurable concurrency (default 20)
  • Batch Geocode MCP tool: maps_batch_geocode — geocode up to 50 addresses in one AI conversation call
  • Tests: API call tests for air_quality, static_map, batch_geocode (MCP + exec + CLI)
  • All 9 files synced per Tool Change Checklist (15 → 16 tools)
  • 125 smoke test assertions, 0 failures

Stacked on #49 (static_map). Merge #48#49 → this PR.

Test evidence

125 passed, 0 failed

New assertions:
- Air quality MCP call: AQI number + category
- Static map MCP call: image content type + PNG + base64
- Batch geocode MCP call: 2/2 addresses succeed
- exec air-quality: success + AQI
- exec static-map: success + base64 + dimensions
- batch-geocode CLI: 2 addresses from temp file

Test plan

  • npm run build passes
  • npx tsx tests/smoke.test.ts — 125 passed, 0 failed
  • batch-geocode -i file works from CLI
  • maps_batch_geocode tool returns results via MCP

🤖 Generated with Claude Code

cablate and others added 5 commits March 17, 2026 00:41
- 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 force-pushed the feat/batch-geocode branch from 5ad5681 to 5394031 Compare March 16, 2026 16:41
@cablate cablate changed the base branch from feat/static-map to main March 16, 2026 16:41
@cablate cablate merged commit bab3e28 into main 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