Skip to main content
Glama
librejustice

LibreJustice

Official

Search Legal Texts

search_legal_texts
Read-onlyIdempotent

Find legal articles by subject or wording when the article number is unknown. Search in French with descriptive terms to get a ranked shortlist with highlighted snippets, filterable by code, jurisdiction, and date.

Instructions

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.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so safety is covered. The description adds substantial behavioral context: returns a ranked shortlist with snippets and exact total, includes a facets block with per-filter article counts, and explains the point-in-time semantics of the date parameter (same as get_legal_text). No contradictions.

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?

Two dense sentences with zero filler. The opening states the purpose, then immediately gives usage, then facets, then chaining – all high-value information. No redundancy with the schema. The structure is front-loaded and every clause carries weight.

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 5-parameter search tool with a documented output schema, the description covers everything an agent needs: purpose, query construction, filter usage, facet-based refinement, and integration with the sibling tool. The point-in-time date semantics are explained. Nothing essential 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 each parameter has a baseline description. The description adds value beyond the schema by advising how to structure the query ('put the code in the code filter, keep the query for the subject'), clarifying the code filter as 'as in facets.code', and explicitly tying date semantics to get_legal_text. This meaningfully enhances parameter usage, so above the baseline 3.

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), resource (legal articles), and the precise condition (when article number is unknown). Clearly distinguishes from siblings: search_decisions is for case law, get_legal_text is for retrieving a known article by URL. The purpose is unmistakable.

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?

Provides explicit, actionable guidance: query in French with descriptive terms, put the code in the code filter, keep the query for the subject. Explains how to reuse facets keys verbatim for refinement and how to chain hits into get_legal_text with url and date. This is far beyond vague 'when to use' – it is a usage manual.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.