yatmo_get_nearest_by_category
The single nearest point of interest of a given category, with distance and travel time. Use it for laser-focused answers (“where is the nearest train station?”).
MCP TOOL
yatmo_get_nearest_by_category
LicenceKey header
Returns at most one POI; null when no POI of that category is available near the coordinate.
Inputs
| Name | In | Type | Description |
|---|---|---|---|
| latitude required | argument | double | Latitude in decimal degrees. |
| longitude required | argument | double | Longitude in decimal degrees. |
| category required | argument | string |
Category token. See the category vocabulary: school, nursery, supermarket, public_transport, train_station, motorway, entertainment, daily_life, medical, tourism.
|
| language required | argument | string | Two-letter language code. |
| country required | argument | string | Market code from your licence. |
Example
Nearest school from the Brussels Grand-Place:
{
"name": "yatmo_get_nearest_by_category",
"arguments": {
"latitude": 50.8503, "longitude": 4.3517,
"category": "school",
"language": "fr", "country": "BE"
}
}
Response
| Name | In | Type | Description |
|---|---|---|---|
| category | string | The category token you requested (canonicalised lower-case). | |
| nearest | object? |
{name, distanceMeters, travelTimeMinutes, latitude, longitude} — null when no POI of this category is available.
|
{
"text": "Nearest school: Maria-Boodschaplyceum (581 m).",
"facts": {
"category": "school",
"nearest": {
"name": "Maria-Boodschaplyceum",
"distanceMeters": 581,
"travelTimeMinutes": 7,
"latitude": 50.850082,
"longitude": 4.344922
}
},
"warnings": [],
"metadata": { "country": "BE", "language": "FR", "generatedAtUtc": "…" }
}
School vs nursery
Asking for school returns an actual school — preschool, primary, secondary, or high school. Crèches and daycare are never returned by school; they live under nursery.
Same coordinate, category: "nursery":
{
"facts": {
"category": "nursery",
"nearest": { "name": "Crèche Du Béguinage", "distanceMeters": 473, "travelTimeMinutes": 6, "latitude": 50.853369, "longitude": 4.348639 }
}
}
Per-country resolution
School / nursery / train / motorway are mapped to country-specific sub-types behind the scenes (e.g. France splits Trains=5 and Motorways=6 while every other market uses 4 and 5). You don’t have to know this — pass the AI-friendly token and the right thing comes back.
Related: location summary (returns both nearest school and nearest nursery), nearby POIs, accessibility profile.