Skip to main content
Glama
lihongwen

PDF Reader MCP Server

by lihongwen

find_and_highlight_text

Search PDF files for specific text and highlight matches on selected pages. Returns position information for each occurrence.

Instructions

Find text and return information for highlighting matches.

Args:
    file_path: Path to PDF file
    query: Text to search for
    pages: Page range (e.g., '1,3,5-10,-1') or None for all pages
    case_sensitive: Whether search is case-sensitive (default: False)
    
Returns:
    JSON string with page highlights and position information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
queryYes
pagesNo
case_sensitiveNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

The description does not clarify whether the tool actually highlights the PDF or only returns coordinates for highlighting. It also does not specify if the file is modified, despite the name suggesting modification. With no annotations provided, the description should clearly state the tool's side effects or lack thereof.

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

Conciseness4/5

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

The description is concise and well-structured, with a clear one-line purpose followed by an Args/Returns block. However, the first sentence could be more direct, and some redundancy exists (e.g., repeating parameter names in Args).

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

Completeness3/5

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

The description explains all parameters and provides a return format, but it lacks context about sibling tool differentiation, file prerequisites, and whether highlighting is actual or simulated. Given the tool has an output schema, the return description is adequate but incomplete.

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

Parameters5/5

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

The input schema has 0% description coverage, but the description fully compensates by explaining each parameter: file_path, query, pages, and case_sensitive. It provides default values and usage hints, adding significant meaning beyond the raw schema.

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

Purpose4/5

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

The description clearly states the tool finds text and returns information for highlighting matches. It specifies the resource (PDF) and the action (find and return highlight info). However, it does not differentiate from the sibling tool 'search_pdf_text', which likely performs a similar search function.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'search_pdf_text' or 'read_pdf'. The description lacks context about prerequisites, expected file state, or situations where this tool is preferred.

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/lihongwen/pdfreadermcp'

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