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). Above 20 the window is clamped, not refused.
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
facetsYesPer 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.

TDQS

A5/5.0
Behavior5/5

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

Adds meaningful behavior beyond the readOnly/idempotent annotations: ranked results, highlighted snippets, exact total, a facets block with counts, and chaining semantics. These details help the agent anticipate response structure and refine iteratively, with no contradiction against the 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?

Four dense sentences, each earning its place: purpose, query/filter guidance, facets behavior, and chaining instruction. Information is front-loaded and there is no filler or repetition of schema 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 five-parameter search tool with full schema coverage and an output schema, the description covers query language, filtering, result refinement, and downstream chaining. The agent has everything needed to select and invoke the tool correctly.

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?

Despite full schema coverage, the description supplies real semantic guidance: queries should be in French with descriptive terms, code is a slug/exact-name filter rather than subject words, and facets keys should be reused verbatim. The date parameter is also tied to earlier-version semantics via get_legal_text.

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 action—finding legal articles by subject/wording—with an explicit trigger condition ('when the article number is unknown') that distinguishes it from get_legal_text. It also names the output shape: a ranked shortlist with snippets and an exact total.

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?

Gives explicit query-construction guidance ('Query in French, descriptive terms'), explains where to place the code filter versus the query, and tells the agent to reuse facet keys verbatim for refinement. It also names the downstream tool get_legal_text and the optional date condition for earlier-version disputes.

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.8/5.0
Disambiguation5/5

Each tool maps to a distinct resource or action: getting a decision, getting a legal text, searching decisions, searching legal texts, and listing user activity. Despite shared verbs like 'get' and 'search', the object nouns make the boundaries clear with no meaningful overlap.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: get_decision, get_legal_text, list_my_activity, search_decisions, search_legal_texts. Pluralization is used consistently for search operations and singular nouns for direct retrieval, with no mixed conventions.

Tool Count5/5

Five tools is a tight, well-scoped set for a legal research server: two retrieval tools, two search tools, and one user-activity tool. Each tool earns its place and there is no redundancy or padding.

Completeness4/5

The core research workflow is covered: search and retrieve both legal texts and decisions, with citations and commentary embedded inline. The only minor gap is the lack of explicit bookmark management or citation-list navigation, but those are documented as embedded behaviors rather than dead ends.