Skip to main content
Glama

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, rather than this once per commune. 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.5/5.0
Behavior5/5

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

Annotations only say readOnly/idempotent/closed-world; the description adds far more: the 20% long-questionnaire sample and that results are estimates in communes of 2,000+ households, the meaning of null, and the five 2014 topics whose definitions changed and therefore cannot be subtracted. It even explains that 2014 units not counted (Casablanca and 5 other arrondissement cities) return null. That is exactly the behavioral context an agent cannot get from structured fields.

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?

Long but deliberately sectioned into purpose, reading rules, comparison guidance and 2014 comparability, which keeps it navigable. The prose topic enumeration in the first sentence largely duplicates the topics enum, which is the main source of waste. Front-loading is reasonable, though the core action is buried inside a long topic list.

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?

An output schema exists, so return values need no explanation. Between the comparability caveats, the sample-weight warning, the null semantics, the sibling routing and full parameter coverage, an agent has everything needed to call this correctly on the first attempt.

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?

Schema coverage is 100%, so most parameter meaning is already documented (the Tiznit name-collision note and the labour-vs-employmentStatus distinction appear in the schema itself). The description still adds value by linking parameters to behavior, e.g. passing level without a unit returns every unit of that level in one call, and by tying census=2014 to the null-unit caveat. Slight redundancy with the schema keeps it below 5.

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

Purpose4/5

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

The opening sentence names the exact resource (HCP census figures) and the full set of geographic units it covers, then enumerates the topic space, so an agent knows precisely what data comes back. It earns differentiation by naming list_communes as the alternative for ordered comparisons. The only weakness is that the purpose is expressed as a headless noun phrase rather than an explicit verb+resource statement, but the intent is unmistakable.

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?

It gives explicit when-to-use-this-vs-siblings guidance: for ranking use list_communes with sort rather than calling this once per commune, and to compare régions/provinces/arrondissements pass level without a unit to get them all in one call. It also states usage for reading results (shares/rates are 0-100, null means unpublished) and when to add census=both. Nothing is left to inference.

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.