Calculate Distance
distance_toolCalculate the great-circle distance between two geographic coordinates using the Haversine formula, with results in kilometers, miles, meters, feet, or nautical miles. Works offline without API calls.
Instructions
Calculate the distance between two geographic coordinates. Supports various units including kilometers, miles, meters, feet, and nautical miles. Uses the Haversine formula for accurate great-circle distance calculations. This tool works offline without requiring API calls.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "distance_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Ending coordinate with longitude and latitude | |
| from | Yes | Starting coordinate with longitude and latitude | |
| units | No | Unit of measurement for distance | kilometers |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Ending coordinate | |
| from | Yes | Starting coordinate | |
| units | Yes | Unit of measurement | |
| distance | Yes | Calculated distance between points |