A région, province or cercle
get_unitOne région, province, préfecture or cercle: its name in French and Arabic, its 2024 population and households, the units above it, how many units it holds, and the ones directly under it, named: a région's provinces, a province's cercles. This is the tool for a question about a unit above the commune, such as how many cercles a province has. For a commune or an arrondissement, call get_commune; to list a unit's communes, call list_communes with that unit.
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_unit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | A région, province, préfecture or cercle, by code or slug. | |
| level | No | The level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | ||
| counts | Yes | How many units of each level this one holds. | |
| children | Yes | The units directly under it. Empty for a cercle, whose communes come from list_communes. |