Skip to main content
Glama
renvk

pdf-search-mcp

by renvk

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PDF_SEARCH_DBNoPath to the SQLite database file~/.local/share/pdf-search-mcp/pdf_index.db
PDF_SEARCH_DIRNoPath to your PDF directory (required for first index, remembered after)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
searchA

Search indexed PDFs using FTS5 full-text search.

Supports FTS5 syntax: phrases ("exact phrase"), AND (implicit), OR, NOT, prefix (term*), NEAR(term1 term2, 10), parentheses.

Terms with special characters (dots, hyphens, colons, slashes, ...) are auto-quoted — FTS5 treats them as token separators. You can also quote them yourself: "13445-3", "v2.1".

German ß↔ss / ä↔ae / ö↔oe / ü↔ue variants are expanded automatically.

When no results match all terms (implicit AND), the query is automatically relaxed: first by dropping the term least represented in the corpus, then by OR-ing all terms. A note at the top explains what was searched. Structured queries (explicit operators, NEAR, parentheses) are never relaxed.

Args: query: Search query string. limit: Maximum number of results (default 10, range 1-50).

Returns: Formatted search results with file, subfolder, page, and snippet.

read_pageA

Read the full text of a specific page from an indexed PDF.

Use after search() to read the complete page content around a match. If the result contains garbled text, broken symbols, or unreadable formulas, use read_page_image() instead — it renders the page as a PNG that preserves formulas, diagrams, and tables exactly. For tables and dense data, crop to the relevant region to read values reliably.

Args: filename: PDF filename exactly as shown in search results. page: 1-based page number. subfolder: Subfolder as shown in search results. Required when duplicate filenames exist; pass "" for the root folder.

Returns: Full extracted text of the page.

read_page_imageA

Render a PDF page (or cropped region) as a PNG for visual inspection.

Use instead of read_page() when text extraction misses formulas, diagrams, or tables.

Workflow:

  1. First call: render the full page (no region, default dpi) to orient yourself. Do NOT raise dpi — default 140 already fills the vision model's 1568 px input limit. Higher DPI just gets downscaled.

  2. ALWAYS crop before reading values. Tables, formulas, and dense data are NOT reliably readable at full-page scale. Call again with region to crop the area of interest. DPI auto-scales to fill 1568 px for the crop — do NOT set dpi manually, it is computed automatically.

Args: filename: PDF filename exactly as shown in search results. page: 1-based page number. dpi: Render resolution (default 140, range 1-600). Leave at default for full-page renders. Ignored when region is set (auto-scaled to fill 1568 px). region: Crop box [x1, y1, x2, y2], each value 0.0–1.0, top-left origin. Required for reading values from tables, formulas, or figures — full-page scale is not reliable for these. Example: [0.0, 0.5, 1.0, 0.8] = band from 50–80% down the page. subfolder: Subfolder as shown in search results. Required when duplicate filenames exist; pass "" for the root folder.

Returns: stdio transport: the PNG file path on the first line — open it with your file-reading tool to view. Full-page renders append a crop-advisory line after the path; when passing the result to a file reader, use only the first line. http transport: the rendered PNG as inline image content (no file access needed). Full-page renders include the crop advisory as an additional text item. On error: a plain-text message describing the problem.

statsA

Show PDF search index statistics (file count, page count, DB size, renderer).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/renvk/pdf-search-mcp'

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