Skip to main content
Glama

Morocco communes

Census indicators

get_indicators
Read-onlyIdempotent

HCP's census figures for Morocco or any région, province or préfecture, cercle, commune or arrondissement: age, marital status, fertility, disability, schooling, illiteracy, the languages people read and write and the local languages they use, education, work, employment status and how people get to work, and for households their size, dwelling, occupancy, amenities, wastewater, waste and cooking fuel.

Reading them: shares and rates are percentages from 0 to 100. Null means HCP publishes no figure there. Most come from the long questionnaire, which went to a random 20% of households in communes of 2,000 households or more, so there they're estimates.

Ranking and comparing: to order communes by one figure, call list_communes with sort set to its path. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call.

The 2014 census is here too, under census. Age, education, local languages, illiteracy, fertility, disability, work, the ways of getting to work, dwellings, amenities, wastewater and waste ask what 2024 asks and can be read against it. Where people work and how children get to school are 2014 only. Five topics changed and can't be subtracted: marital status covered everyone rather than people aged 15 and over, schooling ages 7 to 12 rather than 6 to 11, reading and writing was asked as combinations of languages rather than one at a time, a household counted under every cooking fuel it used, and the employment shares took in unemployed people who had worked before. A unit the 2014 census didn't count has null there, Casablanca and the 5 other cities with arrondissements among them, since 2014 published those by arrondissement.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sexNoEveryone (all), men, women, or each of the three. all when left out. Household figures have no sex.
areaNoThe whole unit (total), its urban or rural part, or each of the three. total when left out.
unitNoA région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out.
levelNoWith a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call.
censusNoWhich census. 2024 when left out. both gives the two together, to see what changed.
topicsNoOnly these topics. Every topic when left out. Two are easy to confuse: labour holds the labour force, the activity rate and the unemployment rate, while employmentStatus is how the people in work are employed, as employees, self-employed or apprentices.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already indicate read-only and idempotent hints, so the description builds on that by explaining the sampling methodology (20% long questionnaire) and the meaning of null values. It also discloses that some topics are estimates, adding important context beyond annotations.

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

Conciseness4/5

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

The description is long but packed with valuable information, and it is well-structured with clear sections. The first sentence lists the topics and scope, and subsequent paragraphs handle reading, ranking, and the 2014 comparison. No filler—every sentence adds critical detail, though it could be tightened slightly.

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

Completeness5/5

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

Given the complexity of the tool with 6 optional parameters and an output schema, the description covers all necessary aspects: data sources, interpretation of percentages, sampling caveats, comparison methods, and cross-census compatibility. The output schema exists, so return values are not needed in the description. It is complete for an agent to use correctly.

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

Parameters4/5

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

While schema coverage is 100% and parameters are well-described in the schema, the description adds crucial guidance for the topics parameter by explicitly distinguishing 'labour' from 'employmentStatus', reducing confusion. It also explains how unit and level interact for comparisons, which is not fully clear from the schema alone.

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 clearly states the tool retrieves census indicators for Morocco and its administrative units, listing specific topics and the scope of data. It also differentiates from siblings by mentioning list_communes for ordering and comparing, and implies its role relative to other tools like get_commune and get_housing.

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 explains how to rank communes (use list_communes with sort) and compare regions (give level without unit), providing clear when-to-use guidance. It also clarifies the census parameter for comparing 2014 and 2024, and notes topics that changed, preventing misinterpretation.

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.