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. A zero-match result carries a "hint" explaining why (legislation.gov.uk's own search is CDN-cached for up to an hour, so a genuine no-match and a stale cached page look identical) — never a bare empty "results".

Input 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

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, open-world), yet the description adds real behavioral context: the underlying legislation.gov.uk Atom feed, CDN caching of up to an hour, and that zero-match responses carry a 'hint' rather than a bare empty results array. It does not mention rate limits or cost of pagination, which keeps it from a 5.

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 capability and scope, then useful caveats. The document-type code list is duplicated verbatim from the schema, which is the only meaningful waste in an otherwise dense, well-ordered paragraph.

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 does state the return shape (matching Acts/instruments with full-text URLs) and the zero-match hint behavior, which is the key unknown. It stops short of enumerating the per-result fields an agent would need to consume the response, a modest gap for a 4-parameter search tool.

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 description coverage is 100% and the schema already documents page size, year, title, and the full type code list including the 'ukpga' default. The description largely restates the type enumeration and default, adding little new per-parameter meaning.

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

Purpose4/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 what is returned ('matching Acts/instruments with their full-text URLs') and the data source. Sibling separation is implicit rather than explicit — get_legislation / get_legislation_text / search_within are never named, so the agent must infer that this is the title-word search entry point.

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?

Clear usage context: title-word matching with optional year, 'UK legislation only', and an explanation of how to supply the optional type (exact code, plain category, or omit with a documented default). It stops short of saying when to prefer this over get_legislation or search_within, and gives no exclusions.

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.