Skip to main content
Glama

Get Legal Text

get_legal_text
Read-onlyIdempotent

Fetch a legal text, or one of its articles, as it stood on a given date. Returns the version in force at date (omit for today): full text, status, validity dates, and the timeline of all versions: say which version you quote. The text carries inline markdown links to cross-referenced articles (/texte/, open with get_legal_text; when served at a date, the links point to the same date). commentaires links out to commentary anchored on the article. num absent means you hold the whole text; the url of an article's section, or of a section entry of articles, returns all its articles at once. Covers French codes and statutes, plus curated foreign codes and treaties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoA librejustice.fr article URL `/texte/{juridiction}/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it: {juridiction} is the enacting state as ISO 3166-1 alpha-2 lowercase ("fr", "be"), "eu" for the Union, its treaties included, "intl" for a treaty signed outside it (the ECHR, a bilateral accord), {code} is the code slug ("code-civil", as in facets.legal_instrument), {article} the lowercase article key ("l761-1" for L. 761-1, "1240" for 1240). `/texte/{juridiction}/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read.
codeNoCode slug, when you hold the code and the article apart rather than as a url ("code-civil"). Alone, addresses the text itself.
dateNoConsultation date (YYYY-MM-DD): returns the version in force at that date. Omit for the version currently in force.
textIdNoLégifrance id: an article (LEGIARTI, JORFARTI, KALIARTI), a text (LEGITEXT, JORFTEXT) or a section (LEGISCTA).
articleNoLowercase article key, alongside `code` ("l761-1" for L. 761-1, "1240" for 1240).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
numNo
urlYes
codeYes
etatNo
notaNo
textNo
titleYes
dateFinNo
omittedNo
sectionNo
articlesNo
versionsYes
dateDebutNo
sourceUrlNo
modifiedByNo
articleCountNo
commentairesNo
travauxParlementairesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / textId / description
      Previous value: -"Légifrance article id (LEGIARTI…), resolved to the article it designates. LEGITEXT and CID are not accepted."New value: +"Légifrance id: an article (LEGIARTI, JORFARTI, KALIARTI), a text (LEGITEXT, JORFTEXT) or a section (LEGISCTA)."
    • addedOutput schema / properties / section
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "label": {
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "label",
      +    "url"
      +  ],
      +  "type": "object"
      +}
  2. Changed3 schema fields changed
    • addedOutput schema / properties / commentaires / items / properties / issue
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / commentaires / items / properties / pages
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedOutput schema / properties / commentaires / items / properties / volume
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  3. Changed2 schema fields changed
    • addedOutput schema / properties / modifiedBy
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "date": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "format": "date"
      +      },
      +      "href": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "label"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / travauxParlementaires
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "date": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "format": "date"
      +      },
      +      "href": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null
      +      },
      +      "label": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "label"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed5 schema fields changed
    • changedInput schema / properties / url / description
      Previous value: -"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it: {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). `/texte/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read."New value: +"A librejustice.fr article URL `/texte/{juridiction}/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it: {juridiction} is the enacting state as ISO 3166-1 alpha-2 lowercase (\"fr\", \"be\"), \"eu\" for the Union, its treaties included, \"intl\" for a treaty signed outside it (the ECHR, a bilateral accord), {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). `/texte/{juridiction}/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read."
    • removedOutput schema / properties / commentaires / items / properties / body
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null
      -}
    • changedOutput schema / properties / commentaires / items / properties / kind / enum
      Previous value: -[
      -  "analyse",
      -  "conclusions",
      -  "note"
      -]New value: +[
      +  "conclusions",
      +  "note"
      +]
    • removedOutput schema / properties / commentaires / items / properties / renvois
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / commentaires / items / properties / rubriques
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
  5. Changed14 schema fields changed
    • removedOutput schema / properties / articleCount / description
      Removed value: -"Number of articles the text carries. Present only on the root of a text with articles."
    • removedOutput schema / properties / articles / description
      Removed value: -"Contents of a text root or of one of its divisions, in reading order. Each `url` goes back to get_legal_text; a `section` entry returns all its articles at once, which is the cheapest way to read a chapter. `text` is joined only within the inline reading budget."
    • removedOutput schema / properties / articles / items / properties / num / description
      Removed value: -"Article number, or the division title when `kind` is `section`."
    • removedOutput schema / properties / commentaires / description
      Removed value: -"Institutional commentary anchored on this document: court-written analyses served inline (`body`), plus outbound links (`url`) to the rapporteur public's conclusions and to related institutional documents (reports, opinions, press releases). Context, never the ruling itself. Quote the decision text, not a commentaire, as the court's words."
    • changedOutput schema / properties / commentaires / items / properties / access / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "enum": [
      +      "libre",
      +      "abonnes"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / commentaires / items / properties / access / description
      Removed value: -"libre | abonnes"
    • removedOutput schema / properties / commentaires / items / properties / kind / description
      Removed value: -"analyse = official court-written abstract, full content in `body`. conclusions = the rapporteur public's conclusions, `url` only (copyright-protected, existence + official link). note = linked institutional document (report, avocat général's opinion, press release, doctrine note), `url` + `title` + `publisher`."
    • addedOutput schema / properties / commentaires / items / properties / kind / enum
      Added value: +[
      +  "analyse",
      +  "conclusions",
      +  "note"
      +]
    • removedOutput schema / properties / commentaires / items / properties / renvois / description
      Removed value: -"Doctrinal cross-references of the analyse (« Cf. CE, … »)."
    • removedOutput schema / properties / commentaires / items / properties / rubriques / description
      Removed value: -"Official classification headings (analyse)."
    • removedOutput schema / properties / commentaires / items / properties / url / description
      Removed value: -"External link, to hand to the user, not openable by an MCP tool."
    • removedOutput schema / properties / num / description
      Removed value: -"Article key. Absent when the url addressed the root of a text: with no articles the payload is the whole text, `text` carrying its body; with articles it is the table of contents, `articles` carrying it."
    • removedOutput schema / properties / omitted / description
      Removed value: -"Articles served without their body because the text or division exceeds the inline reading budget: their `url` fetches them."
    • removedOutput schema / properties / text / description
      Removed value: -"Full text; cross-references to other articles render as inline markdown links (/texte/ urls, open with get_legal_text)."
  6. Changed4 schema fields changed
    • changedInput schema / properties / date / description
      Previous value: -"Consultation date (YYYY-MM-DD) — returns the version in force at that date. Omit for the version currently in force."New value: +"Consultation date (YYYY-MM-DD): returns the version in force at that date. Omit for the version currently in force."
    • changedInput schema / properties / url / description
      Previous value: -"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). `/texte/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read."New value: +"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it: {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). `/texte/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read."
    • changedOutput schema / properties / commentaires / description
      Previous value: -"Institutional commentary anchored on this document: court-written analyses served inline (`body`), plus outbound links (`url`) to the rapporteur public's conclusions and to related institutional documents (reports, opinions, press releases). Context, never the ruling itself — quote the decision text, not a commentaire, as the court's words."New value: +"Institutional commentary anchored on this document: court-written analyses served inline (`body`), plus outbound links (`url`) to the rapporteur public's conclusions and to related institutional documents (reports, opinions, press releases). Context, never the ruling itself. Quote the decision text, not a commentaire, as the court's words."
    • changedOutput schema / properties / commentaires / items / properties / url / description
      Previous value: -"External link, to hand to the user — not openable by an MCP tool."New value: +"External link, to hand to the user, not openable by an MCP tool."
  7. Changed4 schema fields changed
    • addedOutput schema / properties / articleCount
      Added value: +{
      +  "description": "Number of articles the text carries. Present only on the root of a text with articles.",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / articles
      Added value: +{
      +  "description": "Contents of a text root or of one of its divisions, in reading order. Each `url` goes back to get_legal_text; a `section` entry returns all its articles at once, which is the cheapest way to read a chapter. `text` is joined only within the inline reading budget.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "kind": {
      +        "enum": [
      +          "article",
      +          "section"
      +        ],
      +        "type": "string"
      +      },
      +      "num": {
      +        "description": "Article number, or the division title when `kind` is `section`.",
      +        "type": "string"
      +      },
      +      "section": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "kind",
      +      "num",
      +      "url"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / num / description
      Previous value: -"Article key. Absent when the url addressed a text with no articles: the payload is then the whole text, `text` carrying its body and `versions` empty."New value: +"Article key. Absent when the url addressed the root of a text: with no articles the payload is the whole text, `text` carrying its body; with articles it is the table of contents, `articles` carrying it."
    • addedOutput schema / properties / omitted
      Added value: +{
      +  "description": "Articles served without their body because the text or division exceeds the inline reading budget: their `url` fetches them.",
      +  "type": "integer"
      +}
  8. Changed1 schema field changed
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "url"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "code"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "textId"
      -    ]
      -  }
      -]
  9. Changed14 schema fields changed
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "url"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "code"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "textId"
      +    ]
      +  }
      +]
    • addedInput schema / properties / article
      Added value: +{
      +  "description": "Lowercase article key, alongside `code` (\"l761-1\" for L. 761-1, \"1240\" for 1240).",
      +  "type": "string"
      +}
    • addedInput schema / properties / code
      Added value: +{
      +  "description": "Code slug, when you hold the code and the article apart rather than as a url (\"code-civil\"). Alone, addresses the text itself.",
      +  "type": "string"
      +}
    • addedInput schema / properties / textId
      Added value: +{
      +  "description": "Légifrance article id (LEGIARTI…), resolved to the article it designates. LEGITEXT and CID are not accepted.",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). Never a Légifrance id — LEGIARTI/LEGITEXT/CID are not accepted."New value: +"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). `/texte/{code}` alone addresses the text itself, which is how a text with no articles (circulaire, publication decree) is read."
    • removedInput schema / required
      Removed value: -[
      -  "url"
      -]
    • addedOutput schema / properties / dateDebut / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / dateDebut / default
      Added value: +null
    • removedOutput schema / properties / dateDebut / type
      Removed value: -"string"
    • addedOutput schema / properties / etat / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / etat / default
      Added value: +null
    • removedOutput schema / properties / etat / type
      Removed value: -"string"
    • addedOutput schema / properties / num / description
      Added value: +"Article key. Absent when the url addressed a text with no articles: the payload is then the whole text, `text` carrying its body and `versions` empty."
    • changedOutput schema / required
      Previous value: -[
      -  "code",
      -  "num",
      -  "title",
      -  "url",
      -  "etat",
      -  "dateDebut",
      -  "versions"
      -]New value: +[
      +  "code",
      +  "title",
      +  "url",
      +  "versions"
      +]
  10. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). An unknown code errors back with the closest slugs."New value: +"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). Never a Légifrance id — LEGIARTI/LEGITEXT/CID are not accepted."
  11. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"Article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). An unknown code errors back with the closest slugs."New value: +"A librejustice.fr article URL `/texte/{code}/{article}`: take it from a search_legal_texts hit or an inline citation link, or compose it — {code} is the code slug (\"code-civil\", as in facets.legal_instrument), {article} the lowercase article key (\"l761-1\" for L. 761-1, \"1240\" for 1240). An unknown code errors back with the closest slugs."
  12. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With readOnlyHint, idempotentHint, destructiveHint, and openWorldHint all already provided by annotations, the description adds substantial behavioral context: date-scoped versioning, inline markdown cross-reference links that follow the consultation date, commentary links, and the semantic distinction between whole-text and article URLs. This goes well beyond the annotation safety profile.

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?

The description is long but dense and front-loaded with the core fetch purpose before diving into URL mechanics and link behavior. Every sentence carries operational detail needed for correct invocation, so the length is justified despite the paragraph-style structure.

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?

Given the tool has an output schema and annotations, the description sufficiently covers all five parameters, return contents, versioning, cross-references, and the special cases of texts without articles and article-section URLs. An agent has enough guidance to invoke the tool correctly in diverse scenarios.

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?

Although schema coverage is 100%, the description adds significant semantic value beyond the schema: it explains URL composition with juridiction/code/article examples, the distinction between /texte/{juridiction}/{code} and /texte/{juridiction}/{code}/{article}, and the Légifrance ID families (LEGIARTI, JORFTEXT, etc.). This materially helps an agent construct valid inputs.

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?

The description opens with a specific verb and resource: 'Fetch a legal text, or one of its articles, as it stood on a given date.' This clearly distinguishes the tool from siblings like search_legal_texts, which locates texts, and get_decision, which retrieves decisions. The scope is further clarified by coverage of French codes, statutes, and curated foreign codes/treaties.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the workflow by saying a URL can be 'take[n] from a search_legal_texts hit or an inline citation link,' and explains the omit-date behavior for current versions. It does not explicitly state when not to use the tool or name alternatives, but the read/fetch role versus the search role is reasonably clear from context.

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.