legislation.gov.uk
liveLegalGovernmentlegislation.gov.uk, search and retrieve full text and metadata for UK Acts of Parliament and statutory instruments.
Tools
search_uk_legislationSearch UK legislation by title words (and optional year), returning matching Acts/instruments with their full-text URLs.
No parameters required.
Try it
get_legislationGet metadata for one specific piece of UK legislation by type + year + number (e.g. ukpga/2010/15 = Equality Act 2010).
No parameters required.
Try it
get_legislation_sectionRead 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"
No parameters required.
Try it
get_legislation_textRead 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_le
No parameters required.
Try it
legislation_amendmentsWhat 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 doe
No parameters required.
Try it
get_explanatory_notesRead 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 endor
No parameters required.
Try it
Test with curl
The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.
curl -X POST https://gateway.pipeworx.io/legislation-uk/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'curl -X POST https://gateway.pipeworx.io/legislation-uk/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_uk_legislation","arguments":{}}}'Use with the SDK
Install @pipeworx/sdk to call tools from any TypeScript/Node project.
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("search_uk_legislation", {});// Or ask in plain English:
const answer = await px.ask("legislation");