Legislation Uk
v0.2.1legislation.gov.uk MCP — the UK's official legislation database.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_uk_legislation
Search UK legislation by title words (and optional year), returning matching Acts/instruments with their full-text URLs. UK legislation only. Source: legislation.gov.uk Atom feed. Document types: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). "type" is optional: give an exact code (e.g. "ukpga"), a plain category ("act", "si", "ssi"), or omit it entirely — omitted defaults to "ukpga" and the response says so. A zero-match result carries a "hint" explaining why (legislation.gov.uk…
| Parameter | Type | Description |
|---|---|---|
title * | string | Words to match in the title, e.g. "equality". |
page | number | Results page (default 1). 20 results per page. |
type | string | Document type code (e.g. "ukpga") or category ("act", "si", "ssi"). Optional — defaults to "ukpga" if omitted. Full code list: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (S… |
year | number | Optional year to restrict results, e.g. 2010. |
get_legislation
Get metadata for one specific piece of UK legislation by type + year + number (e.g. ukpga/2010/15 = Equality Act 2010). Returns title, type, year, number, status, extent, enactment date, a long-title summary, and the full-text URL. Content is XML; fields are best-effort parsed and a raw excerpt is included.
| Parameter | Type | Description |
|---|---|---|
number * | number | Item number within that year/type, e.g. 15. |
type * | string | Document type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). |
year * | number | Year, e.g. 2010. |
get_legislation_section
Read the actual WORDS of one section of a UK Act or statutory instrument — "what does section 5 of the Data Protection Act 2018 say", "quote section 1 of the Human Rights Act", "text of s.170 DPA 2018". Returns the full text of that section alone, so a specific provision does not cost a whole statute. Identify the legislation by type + year + number (Data Protection Act 2018 = ukpga/2018/12) and give the section number. UK law exists in VERSIONS and they differ in substance: pass version to choose "current" (default — the law as amended and in force today), "enacted" (the original text as…
| Parameter | Type | Description |
|---|---|---|
number * | number | Item number within that year/type, e.g. 12 for the Data Protection Act 2018. |
section * | string | Section number, e.g. "5", "170", or "5A" for an inserted section. |
type * | string | Document type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). |
year * | number | Year, e.g. 2018. |
as_at | string | YYYY-MM-DD — the law as it stood on this date. Alias for a date "version"; the response states the actual served version date, which may be earlier than this if nothing changed on the exact date giv… |
version | string | Which version of the text: "current" (default — the law as amended and in force today), "enacted" (the original text as passed), or a date YYYY-MM-DD for the text as it stood on that day. |
get_legislation_text
Read the text of a whole UK Act or statutory instrument — the body of the law rather than a catalogue entry. Use for short instruments and for reading an Act end to end; for one provision prefer get_legislation_section, which returns just that section. Large Acts run to megabytes, so this reads a bounded amount and says plainly when it stopped short rather than returning a silently clipped statute. UK law exists in VERSIONS that differ in substance: pass version to choose "current" (default — the law as amended and in force today), "enacted" (the original text as passed), or a date YYYY-MM…
| Parameter | Type | Description |
|---|---|---|
number * | number | Item number within that year/type, e.g. 12. |
type * | string | Document type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). |
year * | number | Year, e.g. 2018. |
as_at | string | YYYY-MM-DD — the law as it stood on this date. Alias for a date "version"; the response states the actual served version date, which may be earlier than this if nothing changed on the exact date giv… |
version | string | Which version of the text: "current" (default — the law as amended and in force today), "enacted" (the original text as passed), or a date YYYY-MM-DD for the text as it stood on that day. |
legislation_amendments
What has amended this UK Act or instrument, and (in the other direction) what this legislation itself amends — "what has changed the Data Protection Act 2018", "has section 13A been amended", "what does the Victims and Prisoners Act 2024 amend". Each row names the amending/amended instrument, the affected and affecting provisions, the type of change (inserted/substituted/repealed/omitted/amended etc.), whether it has actually been APPLIED (some amendments are made but not yet in force), and the commencement date. PAGED AT 50 — the response states total_results and total_pages; 50 rows is a…
| Parameter | Type | Description |
|---|---|---|
number * | number | Item number within that year/type, e.g. 12 for the Data Protection Act 2018. |
type * | string | Document type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). |
year * | number | Year, e.g. 2018. |
direction | string | "affected" (default) — changes made TO this legislation by other instruments. "affecting" — changes this legislation makes TO other instruments. |
page | number | Results page (default 1). 50 rows per page — see total_pages in the response. |
get_explanatory_notes
Read the Explanatory Notes for a UK Act — plain-language commentary written by the government department responsible, explaining what a section is meant to do and why. NOT part of the law and not endorsed by Parliament — use for context on intent, never as the text of the law itself (use get_legislation_section for that). Pass section to get the commentary for just that section; omit it for an overview plus the notes' own table of contents. Not every Act has notes (Appropriation, Consolidated Fund, Finance and Consolidation Acts never get them) and not every section gets its own paragraph…
| Parameter | Type | Description |
|---|---|---|
number * | number | Item number within that year/type, e.g. 12 for the Data Protection Act 2018. |
type * | string | Document type, e.g. "ukpga". One of: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). |
year * | number | Year, e.g. 2018. |
section | string | Optional: section number, e.g. "5", to get just that section's commentary. Omit for an overview. |