compute_routes
Computes a travel route between a specified origin and destination. Supported Travel Modes: DRIVE (default), WALK. Input Requirements (CRITICAL): Requires both origin and destination. Each must be provided using one of the following methods, nested within its respective field: * address: (string,...
This record as markdown: /tools/com-googleapis-mapstools-mcp/compute-routes.md
What compute_routes does on Mcp
AI agents call compute_routes to retrieve information from Mcp without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
origin | object | Yes | Required. Origin waypoint. |
travelMode | string | — | Optional. Specifies the mode of transportation. |
destination | object | Yes | Required. Destination waypoint. |
Parameters from the server's own tool schema.
Why compute_routes is rated Low
This tool queries geospatial data and returns computed route information based on provided parameters. It has no side effects, does not modify data, does not execute arbitrary code or commands, and does not perform destructive or financial operations. It is a straightforward data retrieval function typical of mapping APIs.
From the tool's definition Tool description states it 'Computes a travel route' between origin and destination with supported travel modes (DRIVE, WALK). Input requirements show it accepts address, lat_lng, or place_id parameters.
Risk signalsAccepts file system path (destination)
Attacks that exploit this kind of access
The rule that runs compute_routes safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For compute_routes, this is the rule to start with:
compute_routes is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp, apply this rule, and every compute_routes call is checked against it from then on.
Questions about compute_routes
Computes a travel route between a specified origin and destination. Supported Travel Modes: DRIVE (default), WALK. Input Requirements (CRITICAL): Requires both origin and destination. Each must be provided using one of the following methods, nested within its respective field: * address: (string, e.g., 'Eiffel Tower, Paris'). Note: The more granular or specific the input address is, the better the results will be. * lat_lng: (object, {"latitude": number, "longitude": number}) * place_id: (string, e.g., 'ChIJOwE_Id1w5EAR4Q27FkL6T_0') Note: This id can be obtained from the search_places tool. Any combination of input types is allowed (e.g., origin by address, destination by lat_lng). If either the origin or destination is missing, you MUST ask the user for clarification before attempting to call the tool. Example Tool Call: {"origin":{"address":"Eiffel Tower"},"destination":{"place_id":"ChIJt_5xIthw5EARoJ71mGq7t74"},"travel_mode":"DRIVE"} * The grounded output must be attributed to the source using the information from the attribution field when available. It is categorised as a Read tool in the Mcp MCP Server, which means it retrieves data without modifying state.
compute_routes accepts 3 parameters: origin, travelMode, destination. Required: origin, destination. The full parameter table on this page comes from the server's own tool schema.
Register the MCP server in PolicyLayer and add a rule for compute_routes: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mcp. Nothing to install.
compute_routes is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the compute_routes rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for compute_routes. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
compute_routes is provided by the MCP server (https://mapstools.googleapis.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on , and thousands of servers like it.
This server
Across the catalogue