Skip to main content
Glama

Search Legal Texts

search_legal_texts
Read-onlyIdempotent

Find legal articles from their subject, their wording, or an article number with no code named; returns a 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
pinnedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / pinned
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "title": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "title",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. 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."
  3. 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)."
  4. 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."
  5. 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."
  6. 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."
  7. 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."
  8. 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."
      +}
  9. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses the return shape (shortlist, highlighted snippets, exact total), the facets block semantics, and the suggested chaining behavior. It also clarifies the point-in-time date nuance for earlier versions, adding meaningful behavioral context.

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 text is dense but every clause earns its place: purpose, query formulation, facets mechanism, and chaining guidance all appear without fluff. The main purpose is front-loaded before the technical details.

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 a rich output schema and safe annotations, the description covers what an agent needs to call it correctly: query scope, filter usage, facet reuse, and the follow-up call to get_legal_text. No critical behavior is missing for this complexity level.

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 description coverage is 100%, so the baseline is 3, but the description adds practical parameter semantics: how to split content between the query and the code filter, that code accepts slugs or exact names, and when to pass date. This goes beyond the schema without restating it verbatim.

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 opens with a specific action and resource: 'Find legal articles' by subject, wording, or article number without a code name. It is clear, but it does not explicitly distinguish this from the sibling search_decisions tool, so the differentiation is left mostly to the tool names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete usage instructions: query in French, keep subject in the query, put the code in the code filter, and chain hits into get_legal_text with url and optionally date. It does not explicitly state when not to use it or name alternatives such as search_decisions for decisions, so it stops short of full exclusion 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.