Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

by paulieb89

Get Legislation Section

legislation_get_section
Read-onlyIdempotent

USE THIS TOOL WHEN you have a known Act / SI and want the parsed text of a specific section, regulation, or article, with extent and in-force metadata.

Instructions

USE THIS TOOL WHEN you have a known Act / SI and want the parsed text of a specific section, regulation, or article, with extent and in-force metadata.

Returns the provision's own text and its own heading — never a neighbouring or enclosing Part/Chapter's content. Also returns territorial extent, in-force status, and prospective flag. Content capped per max_chars (default 10,000, ~2,500 tokens) — raise for unusually long definition sections; check content_truncated in the response.

Works uniformly across Act sections ('section-N'), SI regulations ('regulation-N'), and SI articles ('article-N') — pass the bare number regardless of which the document uses; you don't need to know which noun applies. Raises a not_found error (rather than returning a plausible but wrong node) if the number doesn't exist in this document — check legislation_get_toc for valid numbers.

ALWAYS check extent — a section may apply to England & Wales but not Scotland or Northern Ireland. Reciting a section without checking extent is a recurring legal-research error.

Alternative: call read_resource(uri="legislation://{type}/{year}/{number}/ section/{section}") for raw CLML XML; use this tool when you want the parsed structured response instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesLegislation type code: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Use the value from legislation_search results.
yearYesYear of enactment
numberYesChapter or SI number
sectionYesProvision number, e.g. '47' or '12A' — works for Act sections, SI regulations, and SI articles alike. Use the numeric part only — not 'section-47'/'regulation-47'/'article-47'. Schedules are not currently supported.
max_charsNoMaximum characters of section content to return. Default 10,000 (~2,500 tokens) covers almost every section. Raise to 50,000+ only for unusually long Finance Act definition sections. Check content_truncated in the response to see if it was cut.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesSection title or heading
extentNoTerritorial extent: list of 'England', 'Wales', 'Scotland', 'Northern Ireland'. Empty list means unknown — do not assume full UK extent.
contentYesPlain text content of the section, possibly truncated per max_chars. Check content_truncated and original_length for full-text information.
in_forceNoFalse if the section is explicitly marked repealed in CLML. True only when an InForce element is present in the section body (rare). Null for most sections — the data.xml endpoint does not carry a per-section current in-force boolean; null does not mean repealed.
warningsNoNon-fatal retrieval or parsing warnings the caller should disclose where relevant.
prospectiveNoTrue if this section has not yet come into force; None if unknown
version_dateNoDate of the version retrieved
source_formatNoSource parsed for this response. html_fallback means CLML XML was unavailable and text was parsed from the public HTML page.xml
section_numberYesSection number, e.g. '47', '12A', 'Schedule 2'
original_lengthNoOriginal plain-text length in characters before any truncation
content_truncatedNoTrue if content was cut to fit max_chars

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.1
    • changedInput schema / properties / section / description
      Previous value: -"Section number, e.g. '47' or '12A'. Use the numeric part only — not 'section-47'. Schedules are not currently supported."New value: +"Provision number, e.g. '47' or '12A' — works for Act sections, SI regulations, and SI articles alike. Use the numeric part only — not 'section-47'/'regulation-47'/'article-47'. Schedules are not currently supported."
  2. Changed8 schema fields changedv0.6.0
    • addedInput schema / properties / max_chars
      Added value: +{
      +  "default": 10000,
      +  "description": "Maximum characters of section content to return. Default 10,000 (~2,500 tokens) covers almost every section. Raise to 50,000+ only for unusually long Finance Act definition sections. Check content_truncated in the response to see if it was cut.",
      +  "maximum": 200000,
      +  "minimum": 500,
      +  "type": "integer"
      +}
    • addedInput schema / properties / number
      Added value: +{
      +  "description": "Chapter or SI number",
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • removedInput schema / properties / params
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "LegislationGetSectionInput.",
      -  "properties": {
      -    "max_chars": {
      -      "default": 10000,
      -      "description": "Maximum characters of section content to return. Default 10,000 (~2,500 tokens) covers almost every section. Raise to 50,000+ only for unusually long Finance Act definition sections. Check content_truncated in the response to see if it was cut.",
      -      "maximum": 200000,
      -      "minimum": 500,
      -      "type": "integer"
      -    },
      -    "number": {
      -      "description": "Chapter or SI number",
      -      "minimum": 1,
      -      "type": "integer"
      -    },
      -    "section": {
      -      "description": "Section number, e.g. '47' or '12A'. Use the numeric part only — not 'section-47'. Schedules are not currently supported.",
      -      "maxLength": 50,
      -      "minLength": 1,
      -      "type": "string"
      -    },
      -    "type": {
      -      "description": "Legislation type code: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Use the value from legislation_search results.",
      -      "maxLength": 10,
      -      "minLength": 2,
      -      "type": "string"
      -    },
      -    "year": {
      -      "description": "Year of enactment",
      -      "maximum": 2100,
      -      "minimum": 1800,
      -      "type": "integer"
      -    }
      -  },
      -  "required": [
      -    "type",
      -    "year",
      -    "number",
      -    "section"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / section
      Added value: +{
      +  "description": "Section number, e.g. '47' or '12A'. Use the numeric part only — not 'section-47'. Schedules are not currently supported.",
      +  "maxLength": 50,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "Legislation type code: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Use the value from legislation_search results.",
      +  "maxLength": 10,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / year
      Added value: +{
      +  "description": "Year of enactment",
      +  "maximum": 2100,
      +  "minimum": 1800,
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "params"
      -]New value: +[
      +  "type",
      +  "year",
      +  "number",
      +  "section"
      +]
    • changedOutput schema / properties / in_force / description
      Previous value: -"Whether this section is currently in force; None if unknown"New value: +"False if the section is explicitly marked repealed in CLML. True only when an InForce element is present in the section body (rare). Null for most sections — the data.xml endpoint does not carry a per-section current in-force boolean; null does not mean repealed."
  3. Changed1 schema field changedv0.5.1
    • changedInput schema / properties / params / description
      Previous value: -"type, year, number, section identifier, optional max_chars."New value: +"LegislationGetSectionInput."
  4. Changed7 schema fields changedv0.4.4
    • changedOutput schema / properties / extent / description
      Previous value: -"Territorial extent: list of 'England', 'Wales', 'Scotland', 'Northern Ireland'"New value: +"Territorial extent: list of 'England', 'Wales', 'Scotland', 'Northern Ireland'. Empty list means unknown — do not assume full UK extent."
    • addedOutput schema / properties / prospective / anyOf
      Added value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / prospective / default
      Previous value: -falseNew value: +null
    • changedOutput schema / properties / prospective / description
      Previous value: -"True if this section has not yet come into force"New value: +"True if this section has not yet come into force; None if unknown"
    • removedOutput schema / properties / prospective / type
      Removed value: -"boolean"
    • addedOutput schema / properties / source_format
      Added value: +{
      +  "default": "xml",
      +  "description": "Source parsed for this response. html_fallback means CLML XML was unavailable and text was parsed from the public HTML page.",
      +  "enum": [
      +    "xml",
      +    "html_fallback"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "description": "Non-fatal retrieval or parsing warnings the caller should disclose where relevant.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  5. Added
  6. Removedv0.4.2
  7. First observedv0.4.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnly/idempotent/openWorld, but the description adds substantial operational context beyond them: content is capped by max_chars with a content_truncated flag, a not_found error is raised rather than returning a plausible-but-wrong node, and it warns that extent must be checked. These are behavioral traits the structured fields do not carry.

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 selection condition and organized into short paragraphs, each carrying actionable content (truncation, error behavior, extent caveat). Some overlap with the schema's own parameter text, so slightly longer than strictly necessary, but nothing is wasted.

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?

An output schema exists so return fields need no re-explanation, yet the description still covers return format essentials (extent, in-force, prospective flag, content_truncated), error semantics, and the cross-noun invocation pattern. Complete for an agent to call it correctly.

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 the baseline is 3, but the description adds real meaning: pass the bare number regardless of whether the document uses section/regulation/article, raise max_chars for unusually long Finance Act definitions, and always check the returned extent. It goes beyond restating the schema.

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 and resource ('get the parsed text of a specific section, regulation, or article') and explicitly scopes what is returned ('the provision's own text and its own heading — never a neighbouring or enclosing Part/Chapter's content'). This clearly distinguishes it from legislation_get_toc, legislation_search, and read_resource.

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?

Opens with 'USE THIS TOOL WHEN you have a known Act / SI', names the alternative read_resource for raw CLML XML with the condition that selects it, and points to legislation_get_toc for valid numbers. When-to-use, when-not-to-use, and alternatives are all explicit.

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