get_legislation_text

Pack: legislation-uk · Endpoint: https://gateway.pipeworx.io/legislation-uk/mcp

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.

Parameters

NameTypeRequiredDescription
typestringyesDocument type, e.g. “ukpga”. One of: ${TYPES}.
yearnumberyesYear, e.g. 2018.
numbernumberyesItem number within that year/type, e.g. 12.
versionstringnoWhich version of the text: ${VERSION_HELP}

Example call

Arguments

{
  "type": "ukpga",
  "year": 2018,
  "number": 12
}

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_text","arguments":{"type":"ukpga","year":2018,"number":12}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_legislation_text', {
  "type": "ukpga",
  "year": 2018,
  "number": 12
});

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.

Regenerated from source · build August 16, 2026