Skip to main content
Glama

mediawiki_search_in_file

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
rationaleNoOptional one-sentence explanation of why you are calling this tool. Used for audit trails when present.
filenameYesFile page name (e.g., 'File:Report.pdf' or just 'Report.pdf')
queryYesText to search for in the file

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
file_typeYes
matchesYes
match_countYes
searchableYes
messageNo
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, openWorldHint. The description adds important context about supported file types and explicit note that scanned/image PDFs are not supported, which is beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (USE WHEN, NOT FOR, PARAMETERS, RETURNS, NOTE). Each sentence is purposeful, front-loaded, and no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that an output schema exists, the description's mention of return format (page/line numbers) is sufficient. It covers purpose, usage, parameters, limitations, and compatibility, making it complete for this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description repeats parameter names and required status, but adds no deeper meaning beyond what schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search for text within wiki-hosted files (PDFs, text files).' It uses a specific verb+resource and distinguishes from sibling tools like mediawiki_search and mediawiki_search_in_page.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Includes explicit 'USE WHEN' and 'NOT FOR' sections with example queries, and names alternative tools: 'use mediawiki_search or mediawiki_search_in_page'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/olgasafonova/mediawiki-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server