Skip to main content
Glama

Search Legal Texts

search_legal_texts
Read-onlyIdempotent

Find legal articles from their subject or wording when the article number is unknown; returns a ranked shortlist with highlighted snippets and the exact total. Query in French, descriptive terms (« délai de recours contentieux refus implicite »); put the code in the code filter (slug or exact name), keep the query for the subject. The response carries a facets block (code, jurisdiction): per filter name, a map of filter value to article count, reuse those keys verbatim to refine. Chain a hit into get_legal_text with its url, plus date when the dispute is governed by an earlier version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoRestrict to one code/text by its URL slug ("code-civil", as in facets.code) or exact name. Omit to search the whole navigable referential.
dateNoConsultation date (YYYY-MM-DD): searches the versions valid at that date (point-in-time, same semantics as get_legal_text). Omit to search the versions currently in force.
limitNoMaximum number of results (default 10).
queryYesFrench query over legal articles. Matches article titles (boosted) and bodies; alias expansion handles acronyms and usual names.
jurisdictionNoFilter by country/legal order, as an ISO 3166 alpha-2 country code: "FR" (France, the bulk of the corpus) or a foreign code ("SN", "DZ", "MA", "VN", "PE", …); plus "UE" for EU law and "INTL" for treaties/international law.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hitsYes
queryYes
totalYes
facetsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • removedOutput schema / properties / facets / description
      Removed value: -"Per filter name, a map of filter value to article count under the current query (code, jurisdiction). Reuse keys verbatim as filter values. Each axis is capped to its top 10."
  2. Changed2 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Consultation date (YYYY-MM-DD) — searches the versions valid at that date (point-in-time, same semantics as get_legal_text). Omit to search the versions currently in force."New value: +"Consultation date (YYYY-MM-DD): searches the versions valid at that date (point-in-time, same semantics as get_legal_text). Omit to search the versions currently in force."
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results (default 10). Above 20 the window is clamped, not refused."New value: +"Maximum number of results (default 10)."
  3. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"How many results to come back with. Keep the default of 10: the reranker has already put the best first, and each extra hit spends caller context on a preview that must not be quoted. Above 20 the window is clamped to 20, not refused."New value: +"Maximum number of results (default 10). Above 20 the window is clamped, not refused."
  4. Changed1 schema field changed
    • changedInput schema / properties / limit / description
      Previous value: -"Maximum number of results (1–20, default 10)."New value: +"How many results to come back with. Keep the default of 10: the reranker has already put the best first, and each extra hit spends caller context on a preview that must not be quoted. Above 20 the window is clamped to 20, not refused."
  5. Changed1 schema field changed
    • changedInput schema / properties / query / description
      Previous value: -"French query over statutory articles. Matches article titles (boosted) and bodies; alias expansion handles acronyms and usual names."New value: +"French query over legal articles. Matches article titles (boosted) and bodies; alias expansion handles acronyms and usual names."
  6. Changed1 schema field changed
    • changedInput schema / properties / code / description
      Previous value: -"Restrict to one code/text by its URL slug (\"code-civil\", as in facets.code) or exact name. An unknown code errors back with the closest slugs. Omit to search the whole navigable referential."New value: +"Restrict to one code/text by its URL slug (\"code-civil\", as in facets.code) or exact name. Omit to search the whole navigable referential."
  7. Changed1 schema field changed
    • addedInput schema / properties / date
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Consultation date (YYYY-MM-DD) — searches the versions valid at that date (point-in-time, same semantics as get_legal_text). Omit to search the versions currently in force."
      +}
  8. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark it read-only and idempotent, and the description adds substantial behavioral detail beyond that: it returns a ranked shortlist with highlighted snippets and an exact `total`, carries a `facets` block reusable verbatim for refinement, and explains the date-versioning interaction with get_legal_text. No contradiction with annotations.

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?

The description is dense but every sentence earns its place: purpose, query construction, filter behavior, facets, and chaining to get_legal_text. It is front-loaded with the core purpose and contains no filler or repetition.

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?

For a search tool with an output schema and five parameters, the description is complete: it explains the query language, filter usage, facets, date semantics, and the correct follow-up call. The presence of the output schema means return-value details need not be restated, and nothing essential for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema covers all 5 parameters, the description enriches them with usage semantics: query should be in French descriptive terms, code should be a slug or exact name with the query reserved for subject, and date has the same point-in-time semantics as get_legal_text. This goes well beyond the schema's property descriptions.

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?

The description opens with a specific verb and resource: 'Find legal articles from their subject or wording when the article number is unknown.' This clearly differentiates it from get_legal_text (article known by URL/number) and search_decisions (decisions, not articles), so an agent can select it correctly without opening schemas.

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?

It gives explicit conditions: use when the article number is unknown; query in French descriptive terms; put the code in the `code` filter; keep the query for the subject. It also names the follow-up alternative by instructing to chain a hit into get_legal_text with `url` and `date`, which is clear routing 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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: decisions, legal texts, search over each, and user activity. Even though get_decision and get_legal_text both fetch documents, their domains are clearly separated by name and description.

Naming Consistency5/5

All tool names follow the same snake_case verb_noun pattern: get_*, search_*, list_*. There is no mixing of conventions, vague verbs, or inconsistent casing.

Tool Count5/5

Five tools is well-scoped for a legal research server: search and retrieval for both decisions and legal texts, plus user activity. Every tool fills a clear role without redundancy.

Completeness5/5

The domain is read-oriented legal research, and the set covers both search and retrieval for its two primary object types, with user activity as a useful auxiliary. There are no obvious dead ends or missing core operations.