Skip to main content
Glama

List UK Legislation Sections

ukleg.legislation.sections
Read-onlyIdempotent

Get the complete list of sections, parts, and schedules (table of contents) for a specific piece of UK legislation. Returns each section with its type (section, schedule, part), number, title, and URL to the full section text. Use this to navigate the structure of an Act before retrieving specific provisions. Requires the legislation type, year, and chapter number (use ukleg.legislation.search to find these). Example: type=ukpga, year=2023, number=55 returns all sections of the Online Safety Act 2023. Example: type=ukpga, year=1998, number=42 returns sections of the Human Rights Act 1998. Data source: legislation.gov.uk — The National Archives, Open Government Licence v3.0, no auth required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesLegislation 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).
yearYesYear the legislation was enacted (e.g. 2023 for legislation passed in 2023).
numberYesChapter or instrument number within the year (e.g. 55 for the Online Safety Act 2023 c.55).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed. Includes error code, message, request_id, and any provider-specific extras.
resultNoTool 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint false, so the description doesn't need to repeat those. It adds value by specifying the return content (sections with type, number, title, URL), the data source (legislation.gov.uk), and that no auth is required—context beyond the annotations that helps the agent set expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than two sentences but each sentence earns its place: purpose, return details, usage guidance, prerequisites, examples, data source, and license. It is front-loaded with the core function and avoids redundancy, though it could be trimmed slightly without losing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all necessary information for an agent to call this tool correctly: what it returns, what parameters are required, how to obtain those parameters, and concrete examples. With an output schema present, it need not describe return structure further. No critical gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are already documented. The description adds value by explaining the combination '(type, year, number)' is needed to identify a specific Act, gives examples mapping to real legislation (Online Safety Act 2023, Human Rights Act 1998), and directs the agent to search when these are unknown—richer than the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the complete list of sections, parts, and schedules for a specific piece of UK legislation, including type, number, title, and URL. This is distinct from sibling tools like search (find legislation) and details, and the description explicitly frames its purpose as navigating the structure of an Act.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly tells the agent to use ukleg.legislation.search to find the required type, year, and number, and states the tool should be used to navigate structure before retrieving specific provisions. This provides clear when-to-use and prerequisite guidance, plus concrete examples that reinforce correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.