Skip to main content
Glama

Morocco communes

A région, province or cercle

get_unit
Read-onlyIdempotent

One 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYesA région, province, préfecture or cercle, by code or slug.
levelNoThe level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYes
countsYesHow many units of each level this one holds.
childrenYesThe units directly under it. Empty for a cercle, whose communes come from list_communes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and idempotentHint=true, so safety is covered. The description adds useful behavioral context about hierarchical resolution, including which child units are returned for which level, and the shared-name disambiguation behavior involving level. It does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but efficient: it front-loads the return contents, then states when to use it, then names alternatives. Every sentence earns its place and no filler is present.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich schema, output schema, and read-only annotations, the description is largely complete for invocation and selection. It clearly explains what is returned and routes to siblings. A minor gap is that 'préfecture' is mentioned as a supported unit type but does not appear in the level enum, which could leave an agent uncertain how to disambiguate a préfecture when a name is shared.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already explains code/slug usage and the shared-name level disambiguation. The description reinforces the unit hierarchy and maps it to typical questions, but it adds little parameter-level detail beyond what the schema already provides, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource type (région, province, préfecture, cercle) and enumerates exactly what is returned: names in French/Arabic, 2024 population, households, ancestors, and children. It also differentiates itself from sibling tools by naming get_commune for lower-level units and list_communes for listing communes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states the tool's target: 'This is the tool for a question about a unit above the commune, such as how many cercles a province has.' It also gives clear alternatives: call get_commune for a commune or arrondissement, and list_communes to list a unit's communes. The routing guidance is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.