Skip to main content
Glama

Figures that stand out in a commune

get_insights
Read-onlyIdempotent

For a commune, up to 3 of its 2024 census figures that stand out: among the highest or lowest communes, moved far more or less than other communes since 2014, or far from its province's figure. Each comes with its context as numbers, worked out from the census: the commune's other figures here, the communes it borders on the same figure (their median and the one furthest from it), and the same figure in 2014 beside Morocco's, where the two censuses can be compared. A commune with any figure the two censuses disagree on is left out, on its own page and as a neighbour. Figures they measure differently, shares by sex and likely errors in the data are left out too. An economy or housing figure on fewer than 100 businesses or urban dwellings is left out, since a handful of them can swing a share. A census figure in a commune of 2,000 households or more is marked sampled, since the long questionnaire went to a sample of households there. No language model writes or judges any of it. Only communes have these, and most have none.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYesA commune, 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
messageNoPresent when no figures are published for this place.
findingsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedOutput schema / properties / findings / items / properties / line / description
      Added value: +"The figure in a sentence, in English, French and Arabic."
    • addedOutput schema / properties / findings / items / properties / line / properties / ar
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / findings / items / properties / line / required
      Previous value: -[
      -  "en",
      -  "fr"
      -]New value: +[
      +  "en",
      +  "fr",
      +  "ar"
      +]
  2. Changed2 schema fields changed
    • addedOutput schema / properties / findings / items / properties / sampled
      Added value: +{
      +  "description": "True when the figure is a census figure in a commune of 2,000 households or more, where the long questionnaire went to a sample. False for an economy or housing figure, and for a smaller commune.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / findings / items / required
      Previous value: -[
      -  "id",
      -  "kind",
      -  "measure",
      -  "value",
      -  "reference",
      -  "direction",
      -  "line",
      -  "breakdown",
      -  "context"
      -]New value: +[
      +  "id",
      +  "kind",
      +  "measure",
      +  "value",
      +  "reference",
      +  "direction",
      +  "sampled",
      +  "line",
      +  "breakdown",
      +  "context"
      +]
  3. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, the description discloses substantial behavioral traits: whole categories of exclusions (disagreeing censuses, sex-share figures, likely errors, economy/housing on <100 businesses or dwellings), a 'sampled' marking for communes of 2,000+ households, and the fact that nothing is model-generated. This is exactly the kind of context an agent cannot infer from annotations alone.

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 core output is front-loaded in the first sentence, and subsequent sentences each carry a distinct exclusion or caveat rather than filler. It is long for a two-parameter read tool and some of the return-content detail overlaps the output schema, but nothing is padding.

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?

With annotations covering the safety profile and an output schema present, the description need not explain return values; it nonetheless covers scope, exclusions, sampling caveats, and the commune-only limitation. An agent has everything needed to invoke it correctly and interpret empty or 'sampled' responses.

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 description coverage is 100% and both parameters are already documented with type, enum, and a name-collision note, so the baseline is 3. The description adds only a weak signal ('for a commune', 'only communes have these') that usefully implies which values of 'unit'/'level' actually yield results, but it does not deepen the parameter contract materially.

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 description states a specific resource: up to 3 standout 2024 census figures for a commune, with the types of standout (highest/lowest, biggest change since 2014, far from province figure) spelled out. This is clearly distinguishable from data-listing siblings like get_indicators or get_commune, though it never names an alternative explicitly. Purpose is unambiguous, so 4 rather than 5.

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

Usage Guidelines3/5

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

'Only communes have these, and most have none' gives a real usage precondition and warns that empty results are common. However, no alternative tool is named for when a caller wants raw figures rather than outliers, and no explicit when-to-use guidance versus get_indicators/get_commune is offered. Usage is implied rather than stated.

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.