Skip to main content
Glama

Advanced search (structured criteria)

leginova_advanced_search
Read-onlyIdempotent

Search New Caledonian legal acts, codes, consolidated texts and case law with precise criteria such as keywords, dates, authorities, courts and act types.

Instructions

Structured search mirroring leginova.gouv.nc/recherche-avancee. Pick a target, then either keyword groups (all_words / any_words / exclude_words / exact_phrase) or boolean conditions (ET/OU/SAUF with a field scope), plus filters. Use it for precise requests: acts of a given type and authority over a period, decisions of a given court, articles of selected codes. IDs for themes, authorities, collectivities, act types, courts and codes come from leginova_get_catalogue. Filters apply per target: act_types/authority_ids (actes, textes_consolides), collectivity_ids (actes, codes, global), code_slugs/section_types (codes), courts/court_orders/decision_types/case_number (jurisprudence), consolidated_* (textes_consolides). The meaning of date_from/date_to follows the target: publication date (actes), application date (codes), text date (textes_consolides), hearing date (jurisprudence). There is no article-number field here: use leginova_get_code_article, which tolerates L./Lp. prefixes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-based page number
sortNoglobal target only
courtsNoe.g. ["COUR_APPEL", "TRIBUNAL_ADMINISTRATIF"]
targetYes
date_toNo
act_typesNoe.g. ["ARRETE", "DELIBERATION", "LOIS_DU_PAYS"]
all_wordsNoEvery word must appear
any_wordsNoAt least one of these words
date_fromNo
page_sizeNoResults per page (max 50)
theme_idsNo
code_slugsNo
conditionsNoBoolean conditions, evaluated in order (expert mode). Not combinable with the keyword fields.
case_numberNoJurisprudence reference number, e.g. "13-15646"
court_ordersNo
exact_phraseNoWords that must appear as an exact phrase
authority_idsNo
exclude_wordsNoNone of these words
section_typesNoe.g. ["PARTIE", "LIVRE", "TITRE", "CHAPITRE"]
decision_typesNoe.g. ["ARRET", "JUGEMENT", "ORDONNANCE", "DECISION"]
consolidated_toNo
collectivity_idsNo
consolidated_fromNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
notesYes
queryYes
totalYes
facetsNo
resultsYes
site_urlYes
page_sizeYes
best_matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/open-world, but the description adds behavior they cannot convey: filters are target-scoped, the meaning of date_from/date_to shifts by target, boolean `conditions` are evaluated in order and are 'not combinable with the keyword fields'. That incompatibility rule alone is high-value operational context.

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

Conciseness4/5

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

Front-loaded with the core mode-of-operation ('Pick a `target`, then either keyword groups or boolean conditions'), then proceeds to filter mapping and date semantics. Dense, run-on sentences, but for a 23-parameter tool nearly every clause carries necessary information.

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?

Covered: target semantics, filter-to-target mapping, target-dependent date meaning, the keyword-vs-boolean exclusivity, prerequisite catalogue lookups, and the article-number workaround. An output schema exists, so return values need not be described. An agent has everything needed to construct a valid call.

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?

With only 57% schema description coverage, the description carries real weight: it enumerates which filters apply to each target (act_types/authority_ids, collectivity_ids, code_slugs/section_types, courts/court_orders/decision_types/case_number, consolidated_*) and redefines date_from/date_to per target. It does not clarify sort/page/page_size beyond the schema, leaving some gap.

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+resource (structured search) and immediately scopes it to 'precise requests: acts of a given type and authority over a period, decisions of a given court, articles of selected codes', which makes the tool's niche legible. It stops short of naming leginova_search as the simpler sibling alternative, so the contrast is inferred rather than stated.

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?

Explicitly says when to reach for it ('Use it for precise requests...') and routes prerequisites to siblings: IDs must come from leginova_get_catalogue, and there is a stated negative case with an alternative ('no article-number field here: use leginova_get_code_article'). This is textbook when/when-not/alternative guidance.

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