search_pdf_text
Search for text in PDF documents and retrieve match locations, page numbers, and surrounding context.
Instructions
Search for text content across PDF pages with detailed match information.
Args:
file_path: Path to PDF file
query: Text to search for (or regex pattern if regex_search=True)
pages: Page range (e.g., '1,3,5-10,-1') or None for all pages
case_sensitive: Whether search is case-sensitive (default: False)
regex_search: Whether to treat query as regex pattern (default: False)
context_chars: Number of characters to show around matches (default: 100)
max_matches: Maximum number of matches to return (default: 100)
Returns:
JSON string with search results, match locations, and contextInput Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| query | Yes | ||
| pages | No | ||
| case_sensitive | No | ||
| regex_search | No | ||
| context_chars | No | ||
| max_matches | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |