Search within a UK Court Judgment
case_law_grep_judgmentSearch within a UK judgment for paragraphs matching a regex or substring pattern, returning snippets and eIDs for further reading.
Instructions
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
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | TNA judgment slug, e.g. 'uksc/2024/12' or 'ewca/civ/2023/450'. | |
| pattern | Yes | Regex pattern (or plain substring) to search within paragraph text. If the pattern doesn't compile as regex, falls back to literal substring match. | |
| case_insensitive | No | Default true. Set false for case-sensitive matching. | |
| max_hits | No | Cap on number of hits returned. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The judgment slug that was searched | |
| pattern | Yes | The pattern that was searched for | |
| hits | Yes | Matching paragraphs in document order | |
| truncated | Yes | True if hit count reached max_hits and more matches may exist |