calculate_distance
Computes the great-circle distance between two cities in kilometers and miles. Geocodes city names to determine coordinates.
Instructions
Calculate the great-circle (Haversine) distance between two cities.
Geocodes both cities via Nominatim, then computes the distance in
both kilometres and miles.
Parameters:
from_city — Origin city name (required), e.g. "London".
to_city — Destination city name (required), e.g. "Paris".
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_city": "<from_city>",
"to_city": "<to_city>"
},
"name": "calculate_distance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from_city | Yes | ||
| to_city | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |