Get Legislation Table of Contents
legislation_get_tocRetrieve the structural table of contents for UK legislation, including parts, chapters, sections, and schedules, with pagination support for large statutes.
Instructions
USE THIS TOOL WHEN you have a known Act / SI and want the structural table of contents (parts, chapters, sections, schedules).
Returns structural elements with XML id and title, e.g. 'section-47: Definitions'. AFTER calling, pass the numeric section identifier (use '47', NOT 'section-47') into legislation_get_section for full text.
Large statutes (Companies Act 2006 has many hundreds of items) are paginated via offset/limit. Check has_more and total_items.
Alternative: call read_resource(uri="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 response with
offset / limit / has_more for stepping through large statutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes | LegislationGetTocInput. |
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 structural items parsed from the XML, before offset/limit. Compare to `returned` and `has_more` to decide whether to paginate. | |
| 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'). |