Skip to main content
Glama

Search Moroccan administrative units

search
Read-onlyIdempotent

Find régions, provinces and préfectures, cercles, communes and arrondissements of Morocco by name. Takes French or Arabic, a slug, or another name a place is known by: Fez finds Fès, Mogador finds Essaouira. A neighbourhood's name finds the arrondissement or commune it's in, with matched neighbourhood and the neighbourhood's names: Sidi Maârouf finds Aïn-Chock, in Casablanca. The census has no figures for a neighbourhood itself. A 5-digit postcode finds the commune it's in, with matched postcode: 20520 finds Casablanca. Returns codes; pass a commune's code to get_commune for its population and parents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many results. 10 when left out, at most 50.
queryYesThe name to look for, in French, Arabic or as a slug, or a unit's code.
levelsNoOnly these levels. Every level when left out.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedOutput schema / properties / results / items / properties / matched / enum
      Previous value: -[
      -  "code",
      -  "exact",
      -  "alias",
      -  "prefix",
      -  "spelling",
      -  "trigram"
      -]New value: +[
      +  "code",
      +  "exact",
      +  "alias",
      +  "prefix",
      +  "spelling",
      +  "trigram",
      +  "neighbourhood",
      +  "postcode"
      +]
    • addedOutput schema / properties / results / items / properties / neighbourhood_ar
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / neighbourhood_fr
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / postcode
      Added value: +{
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • changedInput schema / properties / query / description
      Previous value: -"The name to look for, in French, Arabic or as a slug."New value: +"The name to look for, in French, Arabic or as a slug, or a unit's code."
    • changedOutput schema / properties / results / items / properties / matched / enum
      Previous value: -[
      -  "exact",
      -  "alias",
      -  "prefix",
      -  "spelling",
      -  "trigram"
      -]New value: +[
      +  "code",
      +  "exact",
      +  "alias",
      +  "prefix",
      +  "spelling",
      +  "trigram"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, closed-world, so the safety profile is covered. The description adds real behavioral context beyond that: alias/fuzzy matching (Mogador→Essaouira), the fact that a neighbourhood query resolves to its parent arrondissement/commune, and that results are codes rather than data.

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 front-loaded: purpose first, then input forms, then edge cases and the handoff to get_commune. Every sentence carries information, though the run of worked examples is slightly long.

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 structure needn't be explained, yet the description still tells the agent that codes come back and how to use them. Combined with the alias/postcode/neighbourhood rules, nothing needed to call it 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%, so baseline is 3, but the description meaningfully enriches the query parameter beyond the schema's form list by documenting alias resolution and postcode lookup behavior, and by naming the returned codes as the input to get_commune.

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 (find) and a precisely enumerated resource (régions, provinces/préfectures, cercles, communes, arrondissements of Morocco) with concrete examples (Fez→Fès). An agent can distinguish this from siblings like get_commune or list_communes immediately.

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?

Explicitly covers what inputs work (French, Arabic, slug, alias, postcode, neighbourhood name) and routes the agent onward: 'pass a commune's code to get_commune for its population and parents.' It also flags a boundary case — the census has no figures for a neighbourhood itself.

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.