Get Legislation Section
legislation_get_sectionUSE 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": "legislation_get_section"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | 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. | |
| year | Yes | Year of enactment | |
| number | Yes | Chapter or SI number | |
| section | Yes | 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. | |
| max_chars | No | 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Section title or heading | |
| extent | No | Territorial extent: list of 'England', 'Wales', 'Scotland', 'Northern Ireland'. Empty list means unknown — do not assume full UK extent. | |
| content | Yes | Plain text content of the section, possibly truncated per max_chars. Check content_truncated and original_length for full-text information. | |
| in_force | No | 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. | |
| warnings | No | Non-fatal retrieval or parsing warnings the caller should disclose where relevant. | |
| prospective | No | True if this section has not yet come into force; None if unknown | |
| version_date | No | Date of the version retrieved | |
| source_format | No | Source parsed for this response. html_fallback means CLML XML was unavailable and text was parsed from the public HTML page. | xml |
| section_number | Yes | Section number, e.g. '47', '12A', 'Schedule 2' | |
| original_length | No | Original plain-text length in characters before any truncation | |
| content_truncated | No | True if content was cut to fit max_chars |