Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

Get Legislation Section

legislation_get_section
Read-onlyIdempotent

Retrieve the full text, territorial extent, and in-force status of a specific UK legislation section. Check extent to avoid citing provisions that do not apply to your jurisdiction.

Instructions

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

Returns full section text, 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.

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
sectionYesSection number, e.g. '47' or '12A'. Use the numeric part only — not 'section-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
section_numberYesSection number, e.g. '47', '12A', 'Schedule 2'
contentYesPlain text content of the section, possibly truncated per max_chars. Check content_truncated and original_length for full-text information.
content_truncatedNoTrue if content was cut to fit max_chars
original_lengthNoOriginal plain-text length in characters before any truncation
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.
extentNoTerritorial extent: list of 'England', 'Wales', 'Scotland', 'Northern Ireland'. Empty list means unknown — do not assume full UK extent.
version_dateNoDate of the version retrieved
prospectiveNoTrue if this section has not yet come into force; None if unknown
source_formatNoSource parsed for this response. html_fallback means CLML XML was unavailable and text was parsed from the public HTML page.xml
warningsNoNon-fatal retrieval or parsing warnings the caller should disclose where relevant.
Behavior5/5

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

Annotations already declare readOnlyHint, destructiveHint, idempotentHint, openWorldHint. The description adds important context: content capped per max_chars, check content_truncated, always check extent for territorial applicability, and that schedules are not supported. No contradictions with annotations.

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 two concise paragraphs. The first sentence immediately states when to use. Every sentence adds value: purpose, warning about extent, alternative, behavior of max_chars, and output hint. No fluff.

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 5 parameters (4 required), full schema coverage, output schema exists, and detailed annotations, the description covers all necessary aspects: usage conditions, parameter behavior (especially max_chars and section format), important warnings (extent, truncation), and alternative tool. Complete for the task.

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?

Schema description coverage is 100%, but the description adds practical guidance beyond schemas, e.g., max_chars default ~2,500 tokens, raise for long definition sections, check content_truncated. For 'section', it clarifies to use numeric part only and that schedules not currently supported.

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 explicitly states the tool's purpose: retrieving parsed text of a specific section with metadata. It distinguishes from the sibling tool read_resource by specifying this returns structured parsed data. The verb 'get' and resource 'legislation section' are clear.

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?

The description starts with 'USE THIS TOOL WHEN you have a known Act / SI and want the parsed text...' and provides an explicit alternative: 'call read_resource(...) for raw CLML XML; use this tool when you want the parsed structured response instead.' It also advises to check extent, a recurring legal-research error.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/uk-legal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server