mediawiki_search_in_file
Search within wiki-hosted PDFs and text files for specific text, returning matches with page or line 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.
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": {
"filename": "<filename>",
"query": "<query>"
},
"name": "mediawiki_search_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text to search for in the file | |
| filename | Yes | File page name (e.g., 'File:Report.pdf' or just 'Report.pdf') | |
| rationale | No | Optional one-sentence explanation of why you are calling this tool. Used for audit trails when present. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| matches | Yes | ||
| message | No | ||
| filename | Yes | ||
| file_type | Yes | ||
| searchable | Yes | ||
| match_count | Yes |