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 a map places 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

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

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
    • changedOutput schema / properties / douars / items / properties / name_latin / properties / source / enum
      Previous value: -[
      -  "education",
      -  "osm",
      -  "geonames",
      -  "visitors",
      -  "hcp"
      -]New value: +[
      +  "education",
      +  "osm",
      +  "geonames",
      +  "other",
      +  "visitors",
      +  "hcp"
      +]
    • changedOutput schema / properties / douars / items / properties / place / description
      Previous value: -"Its point, where GeoNames or OpenStreetMap maps it in the same commune. Matched by name."New value: +"Its point, where a map places it in the same commune. Matched by name."
    • changedOutput schema / properties / douars / items / properties / place / properties / source / enum
      Previous value: -[
      -  "geonames",
      -  "osm"
      -]New value: +[
      +  "geonames",
      +  "osm",
      +  "other"
      +]
    • changedOutput schema / properties / fractions / items / properties / name_latin / properties / source / enum
      Previous value: -[
      -  "education",
      -  "osm",
      -  "geonames",
      -  "visitors",
      -  "hcp"
      -]New value: +[
      +  "education",
      +  "osm",
      +  "geonames",
      +  "other",
      +  "visitors",
      +  "hcp"
      +]
  2. Changed4 schema fields changed
    • changedOutput schema / properties / douars / items / properties / name_latin / description
      Previous value: -"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."New value: +"Its name in Latin letters where a source writes one: the Ministry of National Education's school lists, OpenStreetMap, GeoNames, 2 visitors who suggested it on the site, or, as hcp, for a douar named like its commune, HCP's Latin name for the commune. HCP names douars in Arabic only."
    • changedOutput schema / properties / douars / items / properties / name_latin / properties / source / enum
      Previous value: -[
      -  "education",
      -  "osm",
      -  "geonames",
      -  "visitors"
      -]New value: +[
      +  "education",
      +  "osm",
      +  "geonames",
      +  "visitors",
      +  "hcp"
      +]
    • changedOutput schema / properties / fractions / items / properties / name_latin / description
      Previous value: -"Where one of its douars has the same name and a source spells it."New value: +"Where one of its douars has the same name and a source spells it, or, as hcp, where it's named like its commune: HCP's Latin name for the commune."
    • changedOutput schema / properties / fractions / items / properties / name_latin / properties / source / enum
      Previous value: -[
      -  "education",
      -  "osm",
      -  "geonames",
      -  "visitors"
      -]New value: +[
      +  "education",
      +  "osm",
      +  "geonames",
      +  "visitors",
      +  "hcp"
      +]
  3. 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"
      +}
  4. Added

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover the read-only, idempotent, closed-world safety profile, but the description adds substantial behavioral context beyond them: names are Arabic-only with Latin only where a source provides it, points exist only where a map places them, detailed figures are withheld and returned as null for douars under 30 households, and urban vs rural coverage is clarified. This is precisely the kind of data caveat 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?

The description is long but front-loaded: the core purpose opens the first sentence, and subsequent sentences cover naming, geometry, figures, withholding, and the urban edge case in a logical order. Every sentence carries useful information, though the density of caveats could be tightened slightly.

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?

With an output schema present, the description need not explain return shapes, and annotations cover safety semantics. The description thoroughly covers data quirks, null behavior, and coverage limits. The only meaningful gap is the absence of explicit sibling routing (search_douars for lookup, get_unit for other unit types), which prevents a 5.

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 the schema already documents all three parameters, establishing a baseline of 3. The description adds real meaning beyond the schema by detailing what the figures flag unlocks (nationality, sex, age, civil registration, marital status, dwelling type, distances to roads/schools/health centre) and the null-withholding rule for small douars. The fraction parameter's 10-digit format is left to the schema, which is fine given full coverage.

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?

States a specific verb and resource — the douars of a rural commune from HCP's 2024 census — and explains what a douar is (villages and hamlets grouped in fractions/mashyakha). It also clarifies an edge case (towns have no douars, though 21 urban communes have some in their rural part). It does not explicitly name or distinguish itself from sibling tools like search_douars or get_unit, so it falls short of the top score.

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?

Usage is implied by the scope 'of a rural commune' and the town exclusion, giving the agent a sense of when the data exists. However, there is no explicit routing to alternatives (e.g., use search_douars to find a douar by name, or get_unit for other unit types), and no statement of prerequisites or when-not-to-use in favor of a sibling.

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.