Search within a UK Court Judgment
case_law_grep_judgmentSearch within a specific UK judgment using a regex pattern to find matching paragraphs with context snippets. Useful for locating terms like 'negligence' or 'foreseeability'.
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 |
|---|---|---|---|
| params | Yes | CaseLawGrepInput. |
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 |