Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

Search UK Legislation

legislation_search
Read-onlyIdempotent

Search UK Acts and Statutory Instruments by title, phrase, or full text. Returns ranked results with links and next-step hints for structural drill-in.

Instructions

USE THIS TOOL WHEN searching UK Acts and Statutory Instruments by title, phrase, or full-text.

Returns ranked results: title, type, year, number, legislation.gov.uk URL, and next_steps hints (toc URI, section template). AFTER calling, chain to legislation_get_toc then legislation_get_section for structural drill-in.

Filter discipline: type and year are exact-match. Use only when you already know the value. For currency-driven searches ("the recent Renters' Rights Act"), query by phrase alone and read the year from the results — guessing a year and filtering by it zeroes results when wrong. For broader concept queries across content, set fulltext=True.

Authoritative source for UK primary and secondary legislation (legislation.gov.uk).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query, e.g. 'Housing Act 1988' or 'data protection personal data'
typeNoFilter by type: 'ukpga' (Acts), 'uksi' (SIs), 'asp' (Scottish Acts), 'nia' (NI Acts). Exact-match — omit if you don't already know whether you're looking for an Act vs an SI.
yearNoFilter by year of enactment (exact-match — a single integer, not a range). Omit unless you already know the Act's year. Speculating a year (e.g. 'this is recent so it must be 2026') and getting it wrong will zero out the result set. Better workflow: query without `year`, then read the year from the returned results.
limitNoMaximum results to return (1–50). Passed to the upstream results-count param.
fulltextNoDefault false → searches Act/SI titles only (best for finding a named Act, e.g. 'Housing Act 1988' returns ukpga/1988/50 first). Set true to search the full text of every Act/SI for the query (returns SIs and regulations that cite the term — e.g. 'rental deposits' would return many implementing instruments).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYesMatching legislation items
totalYesTotal number of matches
Behavior5/5

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

Beyond annotations (readOnlyHint, idempotentHint), the description details exact-match filtering, zero-result risk, ranking, and next_steps hints. No contradiction with annotations.

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

Conciseness5/5

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

The description is front-loaded with purpose, each sentence adds value, and it is well-structured without redundancy. Despite detail, it remains concise and focused.

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 purpose, usage, filtering, chaining, and authority. Given the output schema exists, it need not explain return values. It is complete for a search tool of this complexity.

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

Parameters5/5

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

With 100% schema coverage, the description still adds significant value: examples for query, cautions for type/year, differentiation for fulltext, and explanation for limit. This extra context helps correct usage.

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 explicitly states the tool searches UK Acts and Statutory Instruments by title, phrase, or full-text, listing return fields and authoritative source. It distinguishes from sibling tools like case_law_search and bills_search_bills by specifying the scope of UK legislation.

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?

The description opens with 'USE THIS TOOL WHEN' and provides clear guidance on when to filter by type/year (only when known) and when to use fulltext. It also chains to legislation_get_toc and legislation_get_section, and implicitly directs to other tools for bills or case law.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/paulieb89/uk-legal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server