GoogleMapsSkill

View as MarkdownOpen in Claude

Get driving/walking/transit directions, find places, geocode addresses, and compute routes by coordinates using Google Maps APIs.

Class: GoogleMapsSkill

Tools: compute_route, lookup_address, geocode_address, compute_route_by_coords (each tool name is configurable).

Env vars: GOOGLE_MAPS_API_KEY (required — the tool handlers read this directly and do not fall back to an api_key config value).

api_key
stringRequired

Schema-level declaration for the Google Maps API key. The tool handlers read the GOOGLE_MAPS_API_KEY environment variable at request time; a config value is not used as a fallback.

default_mode
stringDefaults to driving

Default travel mode for compute_route: "driving", "walking", "bicycling", or "transit".

route_tool_name
stringDefaults to compute_route

Custom name for the route computation tool.

lookup_tool_name
stringDefaults to lookup_address

Custom name for the address / place lookup tool.

geocode_tool_name
stringDefaults to geocode_address

Custom name for the address-to-coordinates geocode tool.

route_by_coords_tool_name
stringDefaults to compute_route_by_coords

Custom name for the coordinate-based route computation tool.

1import { AgentBase, GoogleMapsSkill } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'assistant', route: '/assistant' });
4agent.setPromptText('You are a helpful assistant.');
5
6await agent.addSkill(new GoogleMapsSkill({
7 default_mode: 'transit',
8}));
9
10agent.run();