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 or phrase. Returns ranked results with links and next steps for detailed navigation.

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
paramsYesLegislationSearchInput.

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?

Annotations already indicate readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true. The description adds behavioral context: it returns ranked results with specific fields, explains exact-match behavior for type and year, and clarifies that fulltext=False searches titles only. It also states the tool is the authoritative source for UK legislation, which is additional transparency beyond annotations.

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 well-structured with clear sections: purpose, return format, workflow, filter discipline. It front-loads the key purpose. It is slightly lengthy but every sentence adds value. Could be slightly trimmed without losing information, but it remains concise for the complexity.

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?

Given the tool's complexity (search with multiple parameters, filtering discipline, workflow hints) and the presence of an output schema, the description covers all necessary context: what the tool returns, how to use filters correctly, when to chain other tools, and the authoritative source. It leaves no important gaps.

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?

Input schema has 100% description coverage. The description enhances this by adding usage nuances: type and year are exact-match, speculating a year zeros results, fulltext=True for broader concept queries. For example, it explains that query alone is sufficient for currency-driven searches, and the year should be read from results. This adds significant meaning beyond the schema.

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 it searches UK Acts and Statutory Instruments by title, phrase, or full-text. It distinguishes from sibling tools like case_law_search and bills_search_bills by specifying the source (legislation.gov.uk) and the content type (primary and secondary legislation). The verb 'search' and resource 'UK legislation' are clear and specific.

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 starts with 'USE THIS TOOL WHEN', providing an explicit condition. It gives detailed guidance on using type and year filters as exact-match only when the value is known, warns against guessing years, and advises setting fulltext=True for broader queries. It also outlines a post-call workflow: chain to legislation_get_toc then legislation_get_section. This fully distinguishes when to use this tool versus alternatives.

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