Skip to main content
Glama

Search Uk Legislation

search_uk_legislation
Read-onlyIdempotent

Search UK legislation by title words (and optional year), returning matching Acts/instruments with their full-text URLs. UK legislation only. Source: legislation.gov.uk Atom feed. Document types: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts). "type" is optional: give an exact code (e.g. "ukpga"), a plain category ("act", "si", "ssi"), or omit it entirely — omitted defaults to "ukpga" and the response says so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoResults page (default 1). 20 results per page.
typeNoDocument type code (e.g. "ukpga") or category ("act", "si", "ssi"). Optional — defaults to "ukpga" if omitted. Full code list: ukpga (UK Public General Acts), uksi (UK Statutory Instruments), asp (Scottish Parliament Acts), anaw/asc (Wales), nia (Northern Ireland), ukla (UK Local Acts).
yearNoOptional year to restrict results, e.g. 2010.
titleYesWords to match in the title, e.g. "equality".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so the safety profile is covered. The description adds genuinely useful context beyond them: the legislation.gov.uk Atom feed source, the exact document-type code vocabulary, and the defaulting behavior for 'type'.

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?

Front-loaded with the core action and return value, and the type guidance is coherent. Slightly redundant: the full document-type code list is written out in both the description and the schema's 'type' property, which costs space without new information.

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

Completeness4/5

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

With no output schema, the description usefully states the return fields (Acts/instruments plus full-text URLs) and the default type behavior, and the schema documents pagination (20 per page). Complete enough for correct invocation, though it never points the agent to the sibling tools for full text or sections.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description largely restates the schema's type code list and default; the only mildly additive detail is that an omitted type defaults to 'ukpga' and the response discloses this, which the schema's type description already states.

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?

States a specific verb and resource ('Search UK legislation by title words') plus the return shape (matching Acts/instruments with full-text URLs). Scoping to 'UK legislation only' and naming the source and document-type codes lets an agent distinguish it from the sibling get_legislation/legislation_amendments fetch tools.

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

Usage Guidelines4/5

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

Gives clear context: this is a title-word search over UK legislation with an optional year, and it explains the type parameter's three modes (exact code, plain category, omitted). It does not, however, explicitly name the get_legislation* siblings as the alternative for retrieving full content, leaving the search-vs-fetch split to inference.

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.