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.
language required argument string Two-letter language code.
country required argument string Market code from your licence.

Example

Nearest school from the Grand-Place in Brussels, replayed on 21 September 2026:

{
  "name": "yatmo_get_nearest_by_category",
  "arguments": {
    "latitude": 50.846714, "longitude": 4.352514,
    "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, travelMode, latitude, longitude}. travelMode names the mode the distance and time were measured with (see below). null when no place of this category is available, and the text then says so.
{
  "text": "Nearest school: Cefa - Centre Scolaire Eperonniers-Mercelis (363 m).",
  "facts": {
    "category": "school",
    "nearest": {
      "name": "Cefa - Centre Scolaire Eperonniers-Mercelis",
      "distanceMeters": 363,
      "travelTimeMinutes": 3,
      "travelMode": "cycling",
      "latitude": 50.844355,
      "longitude": 4.349471
    }
  },
  "warnings": [],
  "metadata": {
    "country": "BE",
    "language": "FR",
    "generatedAtUtc": "2026-09-21T12:45:41Z"
  }
}

How distances and times are computed

An assistant should therefore quote the mode with the figure. The nearest school from the Grand-Place comes back at 363 m with travelMode: "cycling": that is “363 metres, 3 minutes by bike”, not “a 3 minute walk”. To get a time in a mode you choose, call REST /route with that mode.

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": "César De Paepe",
      "distanceMeters": 551,
      "travelTimeMinutes": 7,
      "travelMode": "transit",
      "latitude": 50.843003,
      "longitude": 4.350692
    }
  }
}
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.