docgrep
Search binary document files (PDF, DOCX, PPTX, XLSX, ODT, ODS, ODP, RTF, EPUB) for lines matching a regex pattern. Returns file path, section, and matching line.
Instructions
Search through document files (PDF, DOCX, PPTX, XLSX, ODT, ODS, ODP, RTF, EPUB) for text matching a regex pattern. Returns grep-like output: filepath:section:matching_line
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": {
"directory": "<directory>",
"pattern": "<pattern>"
},
"name": "docgrep"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Python regex pattern to match against line content. | |
| directory | Yes | Path to the directory to search. Searched recursively, skipping hidden directories. | |
| file_types | No | Limit to specific file types, with or without dots (e.g. ['pdf', 'docx']). Defaults to all supported types. | |
| max_results | No | Maximum number of matching lines to return. | |
| case_sensitive | No | Use case-sensitive matching. Default is case-insensitive. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |