Skip to main content
Glama

UK Business Tools - Ledgerhall

Search within a UK Court Judgment

law_case_law_grep_judgment
Read-onlyIdempotent

USE THIS TOOL WHEN you have a judgment slug and want to find paragraphs whose text matches a pattern.

Returns a list of {eId, snippet, match} hits — small per-paragraph snippets centred on the match. AFTER calling, read full paragraphs via judgment_get_paragraph(slug, eId) or the judgment://{slug}/para/{eId} resource.

Use case: content search within one judgment (e.g. "negligence", "test for foreseeability", "Donoghue"). For paragraph-number navigation by eId, call judgment_get_index instead.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesTNA judgment slug, e.g. 'uksc/2024/12' or 'ewca/civ/2023/450'.
patternYesRegex pattern (or plain substring) to search within paragraph text. If the pattern doesn't compile as regex, falls back to literal substring match.
max_hitsNoCap on number of hits returned.
case_insensitiveNoDefault true. Set false for case-sensitive matching.

Output Schema

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

TDQS

A4.7/5.0
Behavior5/5

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

Adds value beyond the annotations (readOnlyHint, idempotentHint) by disclosing the exact return shape ({eId, snippet, match}), the 'small per-paragraph snippets' behavior, and the regex fallback to literal substring matching. 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?

Well-structured and front-loaded with the trigger condition. Every sentence adds value: return format, use case, alternatives, and regex behavior. No fluff or repetition.

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?

For a search tool with an existing output schema, the description covers the key usage scenario, distinguishes from related tools, explains the regex behavior, and points to the next step for reading full paragraphs. This is complete and self-sufficient.

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 each parameter is already described. The description reinforces that 'pattern' is regex with fallback, but does not add new parameter-specific syntax or constraints beyond the schema. Baseline 3 is appropriate when schema carries the param load.

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 opens with a specific verb+resource combo: 'find paragraphs whose text matches a pattern' within a UK Court Judgment. It clearly distinguishes from sibling tools like judgment_get_index and judgment_get_paragraph, and from broader search tools.

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?

Explicit when-to-use statement ('USE THIS TOOL WHEN you have a judgment slug...'), a concrete use case, and direct alternatives: 'For paragraph-number navigation by eId, call judgment_get_index instead.' Also explains the follow-up step to read full paragraphs.

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.

TDQS

A4/5.0
Disambiguation4/5

Tools are well-grouped by domain prefixes (dd_, gov_, law_, prop_) with clear descriptions that differentiate them. However, there is minor overlap, e.g., dd_search could be used instead of individual searches, and dd_fetch versus dedicated profile tools might cause confusion.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with domain-specific prefixes (dd_, gov_, law_, prop_). Names are descriptive and predictable, e.g., dd_charity_search, gov_govuk_search, law_bills_search_bills.

Tool Count4/5

70 tools is high but justified by the broad scope covering due diligence, government, legal, and property domains. Each domain has a reasonable number of tools (about 15-20 each). The count is on the upper end but still manageable.

Completeness5/5

The tool set is comprehensive across all domains: full CRUD for companies and charities, detailed legal research (cases, legislation, parliament, citations), property data (EPC, planning, price paid, rentals), and government information. No obvious gaps for the intended use cases.

Resources