Skip to main content
Glama
paulieb89

UK Legal Research MCP Server

Search within a UK Court Judgment

case_law_grep_judgment
Read-onlyIdempotent

Search paragraphs in a judgment by pattern to find specific legal content, such as judicial statements on negligence or foreseeability, without needing paragraph numbers.

Instructions

Find paragraphs in a single judgment whose text matches a pattern.

Returns a list of {eId, snippet, match} hits — small per-paragraph snippets centred on the match — so the LLM can decide which full paragraphs to read via judgment://{slug}/para/{eId}.

Use this when answering content-based questions ("what did the judges say about negligence?", "find the test for foreseeability", "did this case cite Donoghue?") rather than navigating by paragraph number (which uses the index resource).

Pattern is regex; if it doesn't compile, falls back to literal substring search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesInput schema for case_law_grep_judgment.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesThe judgment slug that was searched
patternYesThe pattern that was searched for
hitsYesMatching paragraphs in document order
truncatedYesTrue if hit count reached max_hits and more matches may exist
Behavior5/5

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

Adds significant context beyond readOnlyHint: return structure (eId, snippet, match), URI scheme for reading full paragraphs, regex fallback, and max_hits cap.

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?

Two-paragraph structure with front-loaded purpose, efficient wording, no redundancy.

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?

Covers key aspects (search scope, return format, result usage) but lacks details on ordering or pagination beyond cap; still adequate for a tool with output schema.

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 covers all parameters with descriptions; description adds some context (regex fallback, output usage) but doesn't significantly expand beyond 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 clearly states the tool searches within a single UK court judgment for pattern matches, distinguishes it from paragraph navigation and cross-judgment search, and provides specific use case examples.

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?

Explicitly states when to use (content-based questions) and contrasts with index resource for paragraph navigation, along with regex fallback behavior.

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