mediawiki_search_in_file
Search for specific text within wiki-hosted files (PDFs, text files) and retrieve matching lines or page numbers.
Instructions
Search for text within wiki-hosted files (PDFs, text files).
USE WHEN: User asks "search the PDF for X", "find X in the uploaded document".
NOT FOR: Searching wiki pages (use mediawiki_search or mediawiki_search_in_page).
PARAMETERS:
filename: File name on wiki (required)
query: Text to search for (required)
RETURNS: Matches with page numbers (for PDFs) or line numbers.
NOTE: Supports text-based PDFs and text files (TXT, MD, CSV, JSON, XML, HTML). Scanned/image PDFs require OCR and are not supported.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rationale | No | Optional one-sentence explanation of why you are calling this tool. Used for audit trails when present. | |
| filename | Yes | File page name (e.g., 'File:Report.pdf' or just 'Report.pdf') | |
| query | Yes | Text to search for in the file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| file_type | Yes | ||
| matches | Yes | ||
| match_count | Yes | ||
| searchable | Yes | ||
| message | No |