A commune's neighbourhoods and postcodes
get_neighbourhoodsThe neighbourhoods OpenStreetMap and Poste Maroc name in a commune, a city's arrondissements included, with the arrondissement each was placed in where it has a point, where its name comes from, and the postcodes Poste Maroc lists under it; and the commune's postcodes. The census publishes nothing by neighbourhood: the figures are the commune's, or the arrondissement's. To find which commune a neighbourhood is in, call search with its name instead.
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": {
"unit": "<unit>"
},
"name": "get_neighbourhoods"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | A commune, by code or slug. | |
| limit | No | How many neighbourhoods, in alphabetical order. 200 when left out; Casablanca has over 1,400. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | ||
| total | Yes | How many neighbourhoods the commune has, whatever the limit. | |
| message | No | Present when the commune has no named neighbourhoods, whether or not it has postcodes. | |
| postcodes | Yes | ||
| neighbourhoods | Yes |