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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pattern": "<pattern>"
},
"name": "search_content"
}
}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. |