Get UK Legislation Details
ukleg.legislation.detailsGet detailed metadata and the full table of contents (section list) for a specific piece of UK legislation identified by its type, year, and chapter/number. Returns the title, document type, legislative status (enacted/revised), enactment date, last modification date, territorial extent (E+W+S+N.I. or narrower), paragraph counts, and the complete structured list of parts, chapters, and sections with their numbers, titles, and URLs. Use ukleg.legislation.search to find the correct type, year, and number for an act. Example: type=ukpga, year=2008, number=27 retrieves the Climate Change Act 2008. Example: type=ukpga, year=2018, number=12 retrieves the Data Protection Act 2018. Data source: legislation.gov.uk — The National Archives, Open Government Licence v3.0, no auth required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Legislation type code. Common values: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), asc (Senedd Cymru/Wales Acts), nia (Northern Ireland Acts). Example: ukpga for the Climate Change Act 2008. | |
| year | Yes | Year the legislation was enacted (e.g. 2008 for Climate Change Act 2008). | |
| number | Yes | Chapter or instrument number of the legislation within the year (e.g. 27 for Climate Change Act 2008 c.27). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present only when the call failed. Includes error code, message, request_id, and any provider-specific extras. | |
| result | No | Tool response payload. Shape varies per tool — consult the tool description and inputSchema. May be an object, array, string, or number depending on the upstream provider response. |