Skip to main content
Glama

search_legi

Read-only

Recherche pondérée dans les codes et lois consolidés français.

Source : bulk LEGI DILA (3,6 Go avec versions historiques). Trouve
les articles dont le texte ou le titre contient les mots-clés.

`titre_texte` est le titre du TEXTE contenant l'article (« Code civil »,
« Arrêté du 10 août 1998 »). Depuis la ré-ingestion du 10 septembre 2026,
la hiérarchie LEGISCTA est en base (colonne `hierarchie`) et
`get_law_article` sert `titre_section` = le dernier niveau du plan
(« Chapitre Ier : La responsabilité extracontractuelle en général »),
mesuré juste sur 30 articles de 30 codes le 13 septembre 2026. Le plan
complet (partie / livre / titre / chapitre / section) n'est pas encore
servi : pour lui, consulter Légifrance.

Sans filtre `code`, les résultats sont DÉDUPLIQUÉS par texte-parent (un
article par texte, le mieux classé) : `returned` peut donc être bien
inférieur à `total` sans que rien ne manque — c'est le sens de
`deduplicated_by`. Avec un filtre `code`, aucune dédup.

Args:
    query: mots-clés FTS5
    code: filtre optionnel — sigle (CC, CT, CSP, COJ…) ou LEGITEXT/JORFTEXT
        direct. Un sigle inconnu renvoie une erreur explicite (et non,
        comme avant, une recherche non filtrée déguisée en succès).
    date_min/date_max: filtre par date_debut de version (ISO)
    limit: max 50
    offset: pagination

Returns:
    {"total", "returned", "articles": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
limitNo
queryYes
offsetNo
date_maxNo
date_minNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

With only readOnlyHint available, the description carries the behavioral load and does so exceptionally well: it explains parent-text deduplication and why `returned` can be far below `total`, that unknown sigles now raise an explicit error instead of silently degrading, the max limit of 50, and current hierarchy coverage limits.

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

Conciseness3/5

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

Purpose and arg list are front-loaded and structured, but the middle paragraph on LEGISCTA hierarchy, re-ingestion dates and a 30-article sample measurement is verbose and mostly irrelevant to invoking this tool, diluting the actionable content.

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 6-parameter search tool with no schema descriptions, the definition covers match semantics, filter behavior, dedup interpretation, error behavior and pagination adequately; an output schema exists so the return shape need not be detailed further.

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?

Schema description coverage is 0%, so the description must compensate, and it documents all six parameters: FTS5 keywords for `query`, sigle or LEGITEXT/JORFTEXT for `code`, ISO version start dates for `date_min`/`date_max`, plus `limit` and `offset` for pagination.

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?

States a specific verb and resource ('Recherche pondérée dans les codes et lois consolidés français') and narrows the match domain to article text or title keywords. It is clearly distinguishable from decision-oriented siblings, though it never names a sibling search tool to differentiate itself from.

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?

Gives real contextual rules — dedup applies without a `code` filter, no dedup with one, unknown sigles now error out, and full plan levels must be looked up on Légifrance. However, it offers no routing guidance against sibling retrieval tools (search_kali, search_jorf, get_law_article), so tool selection is only implied.

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