search_content
Search a webpage or raw HTML for a specific pattern and retrieve matching snippets with surrounding context and line numbers, so you can locate text, code, or errors without reading the entire page.
Instructions
Search the content of a URL (or raw HTML) and return matching snippet(s) with surrounding context and line numbers. Useful to find specific text/code/errors on a page without reading the whole thing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to fetch and search. Required unless 'html' is provided. | |
| html | No | Raw HTML to search instead of fetching. | |
| format | No | Source content format to search in. | markdown |
| pattern | Yes | Regex pattern to search for in the page's text content. | |
| maxMatches | No | Max matches to return. | |
| contextChars | No | Characters of context before and after each match. |