Skip to main content
Glama

A rural commune's douars

get_douars
Read-onlyIdempotent

The douars of a rural commune from HCP's 2024 census, the villages and hamlets it's made of, grouped in its fractions (mashyakha), named in Arabic only. Each has its kind (grouped, split into sub-douars, or dispersed), its households and its people. A douar has its name in Latin where a source writes one, and its point where GeoNames or OpenStreetMap maps it. With figures, a douar of 30 households or more also has the nationality, sex, age, civil registration and marital status of its people, the kind of dwelling its households live in, and the average distance in km from its dwellings to a paved road, an unpaved road a car can drive on, a primary school, a collège, a lycée and a health centre. HCP withholds those for a smaller douar, and says null. A town has no douars, though 21 communes counted as urban have some in their rural part.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYesA commune, by code or slug.
figuresNoInclude each douar's figures. Left out, a douar is its name, kind, households and people.
fractionNoOnly the douars of this fraction, by its 10-digit code.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYes
totalYesHow many douars are returned.
douarsYes
messageNoPresent when the commune has no douars.
fractionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedOutput schema / properties / douars / items / properties / name_latin
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Its name in Latin letters where a source writes one: the Ministry of National Education's school lists, OpenStreetMap, GeoNames, or 2 visitors who suggested it on the site. HCP names douars in Arabic only.",
      +  "properties": {
      +    "name": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "enum": [
      +        "education",
      +        "osm",
      +        "geonames",
      +        "visitors"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "source"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / douars / items / properties / place
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Its point, where GeoNames or OpenStreetMap maps it in the same commune. Matched by name.",
      +  "properties": {
      +    "lat": {
      +      "type": "number"
      +    },
      +    "lng": {
      +      "type": "number"
      +    },
      +    "source": {
      +      "enum": [
      +        "geonames",
      +        "osm"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "lat",
      +    "lng"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / fractions / items / properties / label
      Added value: +{
      +  "description": "HCP's label in place of a name: a fraction outside the commune, or a notional one.",
      +  "enum": [
      +    "outside",
      +    "notional"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / fractions / items / properties / name_latin
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Where one of its douars has the same name and a source spells it.",
      +  "properties": {
      +    "name": {
      +      "type": "string"
      +    },
      +    "source": {
      +      "enum": [
      +        "education",
      +        "osm",
      +        "geonames",
      +        "visitors"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "source"
      +  ],
      +  "type": "object"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare it a safe, idempotent read; the description goes well beyond that by disclosing data-availability rules (figures only for douars of 30+ households, HCP withholds and returns null), naming conventions (Arabic only, Latin only when a source writes one), and coordinate provenance (GeoNames/OpenStreetMap). These are exactly the gotchas an agent needs before calling.

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?

Dense but information-bearing; every clause carries a distinct fact and the identity/scoping sentence is front-loaded. It would read better split into short grouped sentences, but there is little removable waste.

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 an output schema present, return structure needn't be described, and the description still covers the domain model (fractions/mashyakha, douar kinds, conditional figures) and the town-vs-commune edge case. Nothing an agent needs to call this correctly is missing.

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% and already documents all three params, so baseline is 3. The description adds real meaning on top: it explains what the response degrades to when 'figures' is left out (name, kind, households and people), which the schema only gestures at. It adds nothing beyond the schema for 'unit' or 'fraction'.

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?

States a specific verb and resource (the douars of a rural commune) plus its source scope (HCP 2024 census) and enumerates the fields each douar carries. An agent can tell this apart from get_commune or get_neighbourhoods without opening a schema, since it names the exact sub-unit and its contents.

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?

It gives a partial when-not rule ('A town has no douars, though 21 communes counted as urban have some in their rural part'), which helps scope selection. But it never names an alternative tool (e.g. get_commune, get_neighbourhoods) or states when another sibling is the better choice, so routing must be inferred.

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.