Skip to main content
Glama

HERE route matrix (origins × destinations)

here_route_matrix
Read-only

Calculates travel-time and distance matrices for many origins and destinations via HERE Matrix Routing, handles async submission, polling, and result retrieval, and resumes pending jobs by matrix ID.

Instructions

Calculate travel times (and distances when available) between many origins and destinations with HERE Matrix Routing v8. Handles the HERE async job flow internally: submits the matrix, polls the status URL, downloads the gzip result, and returns a 2D durations matrix in seconds. If the job is still running after waitSeconds it returns matrixId + status so you can call again with {"matrixId":"..."} to resume. Locations are "lat,lng" or addresses (UK focus auto-geocode). Origins and destinations are ordered as supplied and echoed in the response so rows/columns are unambiguous. VERIFIED CAVEAT: HERE Matrix v8 is car-based in practice. transportMode and the HGV "truck" profile are only sent when you explicitly ask for them; if HERE rejects them, retry without them. For per-route HGV restrictions use here_route (truck) instead. The request body is the minimal verified payload: origins, destinations and regionDefinition {type:"world"}. matrixAttributes is never sent (v8 rejects it).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "origins": "<origins>"
    },
    "name": "here_route_matrix"
  }
}

Input Schema

NameRequiredDescriptionDefault
truckNoHGV profile. Only used when transportMode is "truck".
originsYesOrigin points ("lat,lng" or addresses), 1-25. Row order is preserved.
matrixIdNoResume polling an async matrix started earlier (skips submission).
routingModeNoOptional HERE routingMode.
waitSecondsNoHow long to wait for completion before returning a pending result (default 60 s).
destinationsNoDestination points (1-25). Omit for a square origins×origins matrix.
departureTimeNoOptional departure time (RFC 3339 with offset). Improves traffic accuracy but is not part of the minimal verified body.
transportModeNoOptional. Only sent when provided; HERE Matrix v8 is car-based in practice (see tool description).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/openWorld annotations, it discloses the entire hidden async lifecycle (submit, poll status URL, download gzip, return matrix), the pending-result contract, and the verified caveat that transportMode/truck may be rejected by v8 and should be retried without. It also notes matrixAttributes is never sent and regionDefinition is fixed to world.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then behavior, then caveats, so an agent can stop reading early. Slightly dense — the 'VERIFIED CAVEAT' framing and repeated restatement of the minimal payload cost some words, but every sentence carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does: a 2D durations matrix in seconds, plus matrixId + status when pending, plus echoed origin/destination ordering for row/column disambiguation. For a nested-parameter, async, open-world tool this covers what an agent needs to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description still adds meaning by explaining the matrixId resume path, the waitSeconds pending behavior, and the conditional sending of transportMode/truck. It stops short of adding anything about origins/destinations ordering beyond the echo note, which the schema already covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names a specific verb (Calculate), specific outputs (travel times and distances), and the exact resource (many-to-many matrix via HERE Matrix Routing v8). It is clearly differentiated from the sibling here_route, which the description later names as the alternative for per-route HGV work.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use this tool (many origins × many destinations) and explicitly routes HGV-per-route needs to here_route (truck) instead. It also gives a concrete resume procedure: if the job is still running after waitSeconds, call again with {"matrixId":"..."}.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.