search_pdf
Find text in a PDF and get each match with page numbers and context. Use it to locate the right pages, then read them; supports regex and page ranges.
Instructions
Find text in a PDF. Returns each match as 'Page N: ...context...' plus the list of pages hit. Use it to locate the right pages, then read_pdf with pages=. A plain query matches across line breaks and ignores case; set regex=true for a regular expression.
pages: optional 1-based ranges like '1-3,5,7-' to limit the search. context_chars: characters of surrounding text on each side of a match. max_results: snippets to return (the total match count is always reported).
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": {
"path": "<path>",
"query": "<query>"
},
"name": "search_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| pages | No | ||
| query | Yes | ||
| regex | No | ||
| password | No | ||
| max_results | No | ||
| context_chars | No | ||
| case_sensitive | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |