get_legislation_section
Pack: legislation-uk · Endpoint: https://gateway.pipeworx.io/legislation-uk/mcp
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.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | yes | Document type, e.g. “ukpga”. One of: ${TYPES}. |
year | number | yes | Year, e.g. 2018. |
number | number | yes | Item number within that year/type, e.g. 12 for the Data Protection Act 2018. |
section | string | yes | Section number, e.g. “5”, “170”, or “5A” for an inserted section. |
version | string | no | Which version of the text: ${VERSION_HELP} |
Example call
Arguments
{
"type": "ukpga",
"year": 2018,
"number": 12,
"section": "5"
}
curl
curl -X POST https://gateway.pipeworx.io/legislation-uk/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_legislation_section","arguments":{"type":"ukpga","year":2018,"number":12,"section":"5"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_legislation_section', {
"type": "ukpga",
"year": 2018,
"number": 12,
"section": "5"
});
More examples
{
"type": "ukpga",
"year": 2018,
"number": 12,
"section": "5",
"version": "enacted"
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"legislation-uk": {
"url": "https://gateway.pipeworx.io/legislation-uk/mcp"
}
}
}
See Getting Started for client-specific install steps.