text_around
Retrieve cleaned text surrounding an element reference or text match. Returns before, match, and after context blocks for analysis.
Instructions
Return cleaned surrounding text around an element ref or the best ranked text match. Returns {ref, before, match, after, text}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_chars | No | Characters before/after the target (default 400) | |
| ref | No | Optional element ref like e:142 | |
| selector | No | Optional CSS selector to scope context | |
| text | No | Optional text to locate when ref is omitted |