Get Legislation Table of Contents
legislation_get_tocRetrieve the structural table of contents for UK legislation including parts, chapters, sections, and schedules with pagination for large acts.
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 |
|---|---|---|---|
| type | Yes | Legislation type code: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Use the value from legislation_search results. | |
| year | Yes | Year of enactment | |
| number | Yes | Chapter or SI number | |
| offset | No | Number of items to skip from the flattened TOC. Use with limit to page through very large statutes like the Companies Act 2006 (1300+ items). | |
| limit | No | Maximum items to return in this call (default 200, max 1000). Raise only when you need a larger slice in one response. Check has_more and total_items to know if further pages exist. |
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'). |