distance_matrix
Compute haversine distances between multiple geographic points using pure computation. Accepts points as coordinates or named objects, returns distance matrix in metres.
Instructions
Compute haversine distance matrix between multiple points.
Pure computation — no API calls needed. Accepts points as either
[lat, lon] pairs or {"name": ..., "lat": ..., "lon": ...} objects.
Args:
points: JSON array of points. Each point is either:
- [lat, lon] pair (auto-named "Point 1", "Point 2", ...)
- {"name": "Label", "lat": 40.0, "lon": -105.0}
output_mode: "json" (default) or "text"
Returns:
NxN distance matrix in metres between all point pairs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| points | Yes | ||
| output_mode | No | json |