Skip to content

feat: add maps_timezone and maps_weather tools#42

Merged
cablate merged 5 commits intomainfrom
feat/timezone-weather-tools
Mar 14, 2026
Merged

feat: add maps_timezone and maps_weather tools#42
cablate merged 5 commits intomainfrom
feat/timezone-weather-tools

Conversation

@cablate
Copy link
Owner

@cablate cablate commented Mar 14, 2026

Summary

Add two new tools, bringing the total from 8 to 10:

  • maps_timezone — timezone ID, name, UTC/DST offsets, and local time for any coordinates. Uses google-maps-services-js timezone().
  • maps_weather — current weather conditions (temperature, humidity, wind, UV index, precipitation). Uses Google Weather API (weather.googleapis.com). Requires Weather API enabled in Google Cloud Console.

maps_weather closes the only feature gap vs Google Grounding Lite (they had weather, we didn't).

Changes

  • src/services/toolclass.ts — add getWeather() and getTimezone() methods
  • src/services/PlacesSearcher.ts — add facade methods + response interfaces
  • src/tools/maps/timezone.ts — new tool definition
  • src/tools/maps/weather.ts — new tool definition
  • src/config.ts — register both tools with annotations
  • src/cli.ts — add to exec mode
  • tests/smoke.test.ts — add timezone + weather tests (weather is non-blocking if API not enabled)
  • README.md — update tool count, comparison table, tool list, project structure

Test plan

  • npm run build passes
  • npm test — 94 passed, 0 failed
  • exec timezone returns Asia/Tokyo for Tokyo Tower coordinates
  • exec weather returns error gracefully if Weather API not yet enabled
  • CI passes

🤖 Generated with Claude Code

cablate and others added 5 commits March 14, 2026 15:21
- maps_timezone: timezone ID, name, UTC/DST offsets, local time
  via google-maps-services-js timezone()
- maps_weather: current conditions (temperature, humidity, wind, UV,
  precipitation) via Google Weather API (weather.googleapis.com)
- Register both tools in config, exec CLI, and smoke tests
- Update README: 8 → 10 tools, add to comparison table and tool list
- 94 tests passed (weather test is non-blocking if API not enabled)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add forecast_daily (up to 10 days) and forecast_hourly (up to 240 hours)
- Add friendly error message for unsupported regions (Japan, China, etc.)
- Document coverage limitations in tool description
- Use US coordinates in tests (Japan unsupported by Weather API)
- Fix pressure field mapping (airPressure, not pressure)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply agentskill-expertise P4 pattern — descriptions now lead with
user trigger scenarios instead of feature lists:

- elevation: "how high is this place", "is this area flood-prone"
- timezone: "what time is it in Tokyo", "coordinate meeting across timezones"
- weather: "what's the weather in Paris", "pack for a trip" + shorten

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cablate cablate merged commit 1c45c9b into main Mar 14, 2026
1 check passed
@cablate cablate deleted the feat/timezone-weather-tools branch March 14, 2026 16:01
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