Get Legislation Table of Contents
legislation_get_tocRetrieve structured table of contents for UK legislation, enabling navigation through Acts and Statutory Instruments with pagination support for large documents.
Instructions
Retrieve the table of contents for a UK Act or SI.
Returns structural elements (parts, chapters, sections, schedules) with XML id and title, e.g. 'section-47: Definitions'. When calling legislation_get_section, pass only the numeric part — use '47', not 'section-47'.
Large statutes (Companies Act 2006 has 1300+ items) are paginated via offset/limit. Check has_more and total_items on the response.
Alternative: read the resource template
legislation://{type}/{year}/{number}/toc for the full TOC as a
newline-separated id: title string (no pagination). Use this tool
when you need the structured LegislationTOC response with
offset/limit/has_more for stepping through Companies-Act-scale lists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | LegislationGetTocInput with type, year, number, offset, limit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Legislation type code echoed from the request | |
| year | Yes | Year of enactment echoed from the request | |
| number | Yes | Chapter or SI number echoed from the request | |
| offset | Yes | Offset applied to the full TOC item list | |
| limit | Yes | Page size applied after offset | |
| returned | Yes | Number of items in this response | |
| total_items | Yes | Total number of structural items parsed from the XML, before offset/limit. Use this to know the full size of the TOC. | |
| has_more | Yes | True if more items remain beyond offset+returned | |
| items | No | TOC entries in XML document order, formatted as '<id>: <title>', e.g. 'section-47: Definitions'. When calling legislation_get_section pass only the numeric part ('47', not 'section-47'). |