Skip to main content
Glama

madda — Moroccan law, article by article

Search Moroccan law

search_law
Read-onlyIdempotent

Full-text search over Moroccan legislation articles (and texts by number or title, e.g. "65.99" or "مدونة الشغل"). Returns article snippets with URLs. With lang=fr it also returns other_language: laws that exist only in Arabic and that the query names (by number or by a French name such as "code de la route"); their title is the official Arabic title.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_law"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNoloi, decret, dahir, dahir-loi, arrete, constitution
langNoLanguage of the text: "ar" (Arabic, most texts) or "fr" (French translation, when published).ar
limitNo
queryYes
categoryNoCategory slug from list_categories

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish that this is a safe, idempotent, closed-world read, so the description's added value is in disclosing non-obvious behavior: it returns snippets with URLs rather than full texts, and with lang=fr it additionally returns an `other_language` array of Arabic-only laws whose titles are the official Arabic titles. That last detail is genuinely hard to infer and materially affects how an agent interprets results. It does not mention the limit ceiling or result-count behavior, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the core operation and return shape, followed by the one non-obvious caveat. No repetition of the title, no filler, and the examples are doing real disambiguation work.

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 five parameters and no output schema, the description does the heavy lifting on what comes back (snippets plus URLs, plus the fr-specific `other_language` field). The main remaining gap is result-set behavior around `limit` and the kind/category filters, which an agent must infer from the schema alone.

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 60%, and `query` itself carries no description in the schema, so the description compensates by explaining that it accepts free text as well as a law number or title with concrete examples. It also adds meaning to `lang` by describing the fr-specific `other_language` return behavior. `kind`, `category`, and `limit` are left to the schema, which is acceptable but leaves the compensation partial.

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 verb and resource ("full-text search over Moroccan legislation articles") and clarifies that the same query can match texts by number or title, with examples. It is clearly distinguishable from retrieval-oriented siblings like get_article or get_text in practice, but it never explicitly contrasts itself with them.

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 only implied: searching to discover articles and their URLs, then presumably fetching them. There is no explicit statement of when to prefer this over get_article or get_text, nor any exclusion or prerequisite guidance.

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.

Resources