Skip to main content
Glama

uk-legislation-mcp-server

Read UK legislation text

uklaw_get_document
Read-onlyIdempotent

Read one item or one provision of UK legislation from legislation.gov.uk — as it stands now (revised), as enacted/made, or as it stood on a date — in Markdown, with its editorial status, annotations (the applied amendment history), the unapplied effects touching it, the versions available, and attribution. Provision-level reads are the main path; an item-level read returns the whole text only for small items and otherwise an outline of provision paths to read next. With match_text (item level), returns the provisions whose text matches. Revised text is an editorial consolidation that can lag: read editorial.caveat and unapplied_effects before relying on it, and use uklaw_get_amendments for every recorded effect on an item, applied or not.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYesItem path {type}/{year}/{number} — ukpga/2018/12, uksi/2019/419, eur/2016/679, ukpga/Eliz2/3-4/19 — or any legislation.gov.uk URI (a URI carrying a provision, version, or /welsh is split into those parts; a version or /welsh in the URI applies unless the version or language input is set). Get it from uklaw_lookup_citation or uklaw_search_legislation.
versionNocurrent (the latest revised text, or the original text for an item never revised), enacted (made, adopted and created are synonyms — the original text), or a date YYYY-MM-DD for the text as it stood then. Omitted: the version in an item URI, else current. A future date returns the latest version, and a date on or after the made or enactment date of an item never revised returns its original text, with a notice; version.applied reports the version served.
languageNoen, or cy for the Welsh text of Welsh legislation (asc, anaw, mwa, wsi). Omitted: cy when an item URI ends in /welsh, else en. English is returned, with a notice, when no Welsh text exists.
provisionNoProvision path — section/45/2/f, regulation/5, article/28/3, schedule/2/paragraph/3, part/3/chapter/2, introduction — or citation shorthand (s. 45(2)(f), reg. 5, art. 28(3), Sch. 2 para. 3), normalized before the request. Omit to read the item; an item-level outline lists the paths.
match_textNoItem level only (omit provision): return the outline of provisions whose text contains this term, e.g. "processor" — 100 entries per call; outline_offset reaches the rest.
outline_offsetNoWhere a returned outline starts: 0 lists entries 1–100, 100 the next 100. Applies only when kind is outline (ignored when text is returned); a notice names the next offset while entries remain.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemNoThe item read.
kindNofull: text returned; outline: a list of provisions to read instead; pdf_only: the item is held as PDF only (see links.pdf).
textNoThe text as Markdown, present when kind is full; amendments are wrapped as [F1 …] keyed to annotations. A provision with no smaller child provisions that renders over 40,000 characters, counting its annotations, is cut to 40,000, and a notice gives its full size and the links to the full text.
errorNoPresent when the call failed. Absent on success.
linksNoLinks to the document.
noticeNoNotices: Welsh fallback, original text served for a dated read, an omitted provision window, the unapplied effects an item outline leaves out, truncated lists, an outline window with the outline_offset that continues it, an oversized provision with no smaller child provisions returned whole or cut (its full size, and the links to the full text), and how to continue.
outlineNoProvisions to read next, present when kind is outline: up to 100 entries from outline_offset; empty when outline_offset is past the end.
versionNoVersion requested and served.
languageNoLanguage actually served (en or cy).
editorialNoEditorial status — read before relying on revised text.
provisionNoThe provision read — present for provision-level reads.
annotationsNoAnnotations referenced by the text, present when kind is full — the applied amendment history of the version served. When the text is cut, only those the kept text references.
attributionNoAttribution lines the returned content requires (OGL always; EU and Westlaw credits when applicable).
outline_noticeNoHow to read a provision from the outline, naming one to start with; past the outline’s end, its entry count.
unapplied_effectsNoRecorded effects not yet applied to the revised text that touch this provision (at item level, the item’s): the first 20, outstanding first, with a notice when more exist; empty when none. Absent on an item-level outline, where a notice gives the item’s count and uklaw_get_amendments lists them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.