Skip to main content
Glama
UK Business Tools - Ledgerhall

UK Business Tools - Ledgerhall

Get Legislation Section

law_legislation_get_section
Read-onlyIdempotent

Retrieve the parsed text and heading of a specific UK Act section or SI regulation/article, including extent and in-force metadata, without pulling neighbouring provisions.

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 heading, never a neighbouring Part/Chapter. Also returns extent, in-force/prospective data, and truncation metadata. Pass the bare number: the tool handles Act sections and SI regulations/articles. A missing provision raises not_found rather than returning a plausible neighbouring node.

AFTER calling, check extent before relying on the provision and inspect content_truncated for long text. Call legislation_get_toc to discover valid numbers, or read_resource with a legislation:// URI when raw CLML XML is required.

Source: legislation.gov.uk CLML, with an explicitly marked public-HTML fallback only when CLML is unavailable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>",
      "year": "<year>",
      "number": "<number>",
      "section": "<section>"
    },
    "name": "law_legislation_get_section"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYeslegislation.gov.uk type code, e.g. 'ukpga' (UK Acts), 'uksi' (UK SIs), 'asp' (Scottish Acts), 'ssi' (Scottish SIs), 'nia' (NI Acts), 'wsi' (Welsh SIs), 'eur' (retained EU regulations). Not 'act' or 'si'. 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

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. Changed4 schema fields changedv0.4.1
    • changedInput schema / properties / type / description
      Previous value: -"Legislation type code: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Use the value from legislation_search results."New value: +"legislation.gov.uk type code, e.g. 'ukpga' (UK Acts), 'uksi' (UK SIs), 'asp' (Scottish Acts), 'ssi' (Scottish SIs), 'nia' (NI Acts), 'wsi' (Welsh SIs), 'eur' (retained EU regulations). Not 'act' or 'si'. Use the value from legislation_search results."
    • addedInput schema / properties / type / enum
      Added value: +[
      +  "ukpga",
      +  "ukla",
      +  "ukppa",
      +  "gbla",
      +  "apgb",
      +  "gbppa",
      +  "aep",
      +  "aosp",
      +  "asp",
      +  "aip",
      +  "apni",
      +  "mnia",
      +  "nia",
      +  "ukcm",
      +  "mwa",
      +  "anaw",
      +  "asc",
      +  "uksi",
      +  "ssi",
      +  "wsi",
      +  "nisr",
      +  "ukci",
      +  "nisi",
      +  "ukmo",
      +  "nisro",
      +  "ukdsi",
      +  "sdsi",
      +  "nidsr",
      +  "nidsi",
      +  "wdsi",
      +  "eur",
      +  "eudr",
      +  "eudn"
      +]
    • removedInput schema / properties / type / maxLength
      Removed value: -10
    • removedInput schema / properties / type / minLength
      Removed value: -2
  2. First observedv0.2.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), but the description adds real behaviour: a missing provision raises not_found instead of returning a plausible neighbour, extent is returned so callers can check applicability, and a marked public-HTML fallback is used only when CLML is unavailable. That source-fallback disclosure is valuable, though response shape details are otherwise left to the output schema.

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 use case, then behaviour, then follow-up steps and alternatives – a sensible order. Slightly padded by line breaks and the bare-number sentence that duplicates the schema, but no sentence is genuinely 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?

For a four-required-parameter lookup with an output schema, this covers everything an agent needs: valid identification convention, missing-provision behaviour, truncation handling via content_truncated and max_chars, and the escape hatches to TOC and raw XML.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so type/year/number/section/max_chars are all already documented in the schema. The description's "pass the bare number" advice largely restates the schema's "use the numeric part only", so it adds little new meaning. Baseline 3 applies when the schema does the heavy lifting.

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?

"USE THIS TOOL WHEN you have a known Act / SI and want the parsed text of a specific section, regulation, or article" states a concrete verb and resource plus scope. It also rules out the neighbouring-node confusion ("never a neighbouring Part/Chapter"), which makes it distinguishable from the TOC and search siblings.

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?

Gives an explicit when-to-use condition (you already know the Act/SI and provision number) plus named alternatives with the conditions that select them: legislation_get_toc to discover valid numbers, read_resource on a legislation:// URI for raw CLML XML. When-not guidance is implicit but clear from those routes.

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

Deploy Server

Other Tools