Skip to main content
Glama
mlexpertio

MCP PDF Reader

by mlexpertio

MCP PDF Reader

A Model Context Protocol (MCP) server that provides tools for reading and processing PDF documents. Built with Docling for document conversion and text extraction.

Features

  • MCP Server with tools for PDF document processing

  • Document Text Extraction: Convert PDF content to clean Markdown format

  • Document Discovery: List and access available PDF files

Related MCP server: MCP PDF Reader

Tools

The server provides two main tools:

  • get_document_list: Returns a list of all available PDF files in the data directory

  • get_document_text: Extracts and returns the full text content of a specified PDF file in Markdown format

Install

Make sure you have uv installed.

Clone the repository:

git clone git@github.com:mlexpertio/mcp-pdf-reader.git
cd mcp-pdf-reader

Install Python:

uv python install 3.12.10

Create and activate a virtual environment:

uv venv
source .venv/bin/activate

Install dependencies:

uv sync

Usage

Add PDF Documents

Place your PDF files in the data/ directory. The server will automatically detect and make them available through the tools.

Run MCP Server

Start the MCP server:

python server.py

The server runs using stdio transport and can be integrated with any MCP-compatible client.

Development and Testing

Use the MCP inspector to test the server:

mcp dev server.py

This will open a web interface where you can test the available tools and inspect their responses.

Use in VSCode/Cursor

You can use the MCP integration in your editor. Tools & Integrations -> New MCP Server and edit the mcp.json file to include the following:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "/opt/homebrew/bin/uv", // path to your uv binary
      "args": ["run", "--directory", "PATH_TO_YOUR_PROJECT", "server.py"]
    }
  }
}

License

See LICENSE file for details.

Available Tools

2 tools
get_document_listB
Use this tool to get the list of documents.

Returns:
    list[str]: The list of document filenames.
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior2/5

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

No annotations were provided, so the description carries the full burden of behavioral disclosure. It states the tool returns a list of strings (filenames), but it does not reveal any side effects, potential errors, whether the list is sorted, or any limitations (e.g., pagination, timeout). The output schema is present but the description adds little beyond it.

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 very short (three lines), which is appropriate given the tool has no parameters. It front-loads the purpose in the first line. However, it could omit the redundant 'Returns:' block since the output schema already documents the return type.

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

Completeness2/5

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

For a zero-parameter tool with a simple output, the description is minimally adequate. However, it could mention that the list includes all documents available to the user or provide context on document scope (e.g., workspace, shared drives). The sibling tool 'get_document_text' suggests documents are identifiable by filename, but the description does not clarify how filenames map to identifiers.

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

Parameters4/5

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

There are no parameters, so parameter semantics are irrelevant. The description correctly indicates that the tool takes no input, which is consistent with the schema (0 parameters, 100% coverage). It provides a clear return type that is not redundant with the 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 that the tool retrieves a list of documents, using the verb 'get' and the resource 'list of documents'. It distinguishes itself from the sibling tool 'get_document_text' by focusing on listing filenames rather than retrieving document content, though it does not explicitly differentiate.

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 the sibling 'get_document_text'. There is no mention of prerequisites, such as needing a workspace or filter parameters. The description lacks context for appropriate use.

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

get_document_textA
Use this tool to get the content of a document given its filename.

Args:
    filename (str): The filename of the document to get.

Returns:
    str: The content of the document in Markdown format.
ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries full burden for behavioral transparency. It reveals that the return format is Markdown, which is useful, but omits any details about side effects, authentication, rate limits, or error behavior (e.g., missing file). The tool is simple, but more context would be ideal.

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?

The description is extremely concise, comprising only two sentences plus a structured Args/Returns block. It is front-loaded with the purpose and wastes no words.

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?

Given the tool's simplicity, the description covers the basic usage. However, it lacks details about error cases (e.g., file not found) and does not explain how the output relates to the sibling tool. An output schema exists but is not shared; the description mentions returning Markdown, which is helpful but not fully comprehensive.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. However, it merely restates the parameter name and type ('filename (str)') without adding constraints like allowed paths, case sensitivity, or file extensions. This adds little value beyond the schema.

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 the action ('get the content of a document') and the resource ('given its filename'). It directly distinguishes from the sibling tool 'get_document_list' by focusing on content retrieval rather than listing.

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

Usage Guidelines3/5

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

The description indicates when to use the tool (when you need document content) but does not explicitly exclude alternatives or provide when-not-to-use guidance. The existence of 'get_document_list' is implied, but no direct comparison or exclusion is stated.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.1
    • First observedget_document_list
    • First observedget_document_text

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: one retrieves the list of documents, and the other retrieves the content of a specific document. There is no overlap or ambiguity between them.

Naming Consistency4/5

Both tool names follow a consistent 'get_document_<action>' pattern, using snake_case and the same prefix. The minor deviation is that one uses 'text' and the other 'list', but the pattern is clear and predictable.

Tool Count4/5

For a PDF reader MCP server, two tools is minimal but still reasonable for core functionality: listing documents and reading their content. It feels slightly thin but earns its place.

Completeness3/5

The server covers basic read operations (list and get content), but lacks tools for searching within documents, getting metadata, or navigating pages. Agents have no way to target specific sections or handle structured PDFs.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/mlexpertio/mcp-pdf-reader'

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