MCP/Guidelines
Guidelines
[edit | edit source]The safety_guidelines tool returns mandatory guidelines for legal research. The guidelines system uses a two-call workflow:
- Core guidelines — called ONCE at the start of any session via
safety_guidelines(category="core"). Returns foundational rules independent of jurisdiction: 8 non-negotiable safety rules, research methodology, defensive posture, response format and auditability requirements. - Jurisdiction guidelines — called BEFORE researching any new jurisdiction via
safety_guidelines(category="jurisdiction", jurisdiction=""). Returns jurisdiction-specific rules and corpus provenance. When switching jurisdiction mid-session, call again with the new code.
Architecture
[edit | edit source]The guidelines are loaded at server startup and cached for the lifetime of the MCP server process. Restarting the container is required after editing guideline files.
- Core text lives in
duralex-mcp/src/duralex/mcp/core.md and is loaded by the MCP server directly (not by plugins).
- Jurisdiction texts are provided by each jurisdiction plugin via the
get_guidelines() -> str protocol. Each plugin returns a single jurisdiction-scoped supplement.
- Corpus provenance is dynamically appended to jurisdiction guidelines, listing available data sources with document counts, coverage start years, and latest document dates.
Single-jurisdiction variants (e.g., "fr", "eu") are precomputed at registration time. Multi-jurisdiction variants (e.g., "eu|fr") are built on demand by concatenating the relevant single-jurisdiction variants.
The jurisdiction parameter supports Overpass QL operators: "fr", "eu", "eu|fr" (combined), "*" (all jurisdictions), "!=eu" (exclusion). The "!*" operator is not allowed.
Categories
[edit | edit source]Core
[edit | edit source]Foundational rules applicable to all jurisdictions. Contains:
- Identity and tone — research partner posture, no legal advice, no predictions, adaptive fact-gathering
- 8 non-negotiable safety rules — fetch before cite, explicit refusal, quote-first, citation self-check, no jurisdiction mixing, temporal check, absence vs inexistence, quality_check mandatory
- Context window management — compaction detection and warning protocol
- Research methodology — 13-step checklist, search syntax, tool routing, fallback strategies
- Defensive posture and analysis — adversarial self-review, structured reasoning, authority weighting, hallucination pattern detection
- Response format and auditability — citation format, permanent links, danger detection, language rules
Full text: Core guidelines
Jurisdiction: FR (French law)
[edit | edit source]French law-specific rules. Contains:
- Tool routing by legal domain (employment, civil, criminal, tax, data protection, administrative, company information)
- French legal synonyms for FTS
- Normative hierarchy and codification prefixes
- Major reforms and renumbering traps (obligations 2016, security interests 2022, criminal procedure 2024)
- Court system: judicial, administrative, financial orders with court_level mappings
- Publication grades (official_grade) for all court families
- Formations and solemnity ordering
- Decision reading and analysis (Cass, CE, CC, CA/TJ)
- Case number formats
- Labor law (three-tier hierarchy, IDCC, bargaining_level)
- Legislation (territorial scope, text types, nature tag, JORF, code abbreviations, enforcement status)
- Doctrine (BOFiP, CNIL, CADA)
- Deadline computation
- Common traps (40+ pitfalls)
- Practical reflexes (prescription periods, pre-litigation steps)
- Data limitations and source coverage
- Emergency resources
Full text: FR guidelines
Jurisdiction: EU (European law)
[edit | edit source]European law-specific rules. Contains:
- Tool routing (regulations, directives, CJEU, ECHR, CELEX lookup, transposition)
- EU legal terminology and multilingual search
- Courts: CJEU (Court of Justice + General Court), ECHR
- Publication grades and importance grades
- Legislation hierarchy (treaties > regulations > directives > decisions)
- Charter of Fundamental Rights
- Direct effect and primacy
- ECHR margin of appreciation
- Transposition lookup workflow
- CJEU preliminary rulings
- Advocate General opinions
- Decision analysis (preliminary rulings, direct actions, ECHR)
- Practical reflexes
- Emergency resources
Full text: EU guidelines