PDF Tools MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PDF Tools MCP Serverread pages 1-10 from https://example.com/report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PDF Tools MCP Server
中文
一个基于 FastMCP 的 PDF 读取和操作工具服务器,支持从 PDF 文件的指定页面范围提取文本内容。
功能特性
📄 读取 PDF 文件指定页面范围的内容
🔢 支持起始和结束页面参数(包含范围)
🛡️ 自动处理无效页码(负数、超出范围等)
📊 获取 PDF 文件的基本信息
🔗 合并多个 PDF 文件
✂️ 提取 PDF 的特定页面
🔍 正则表达式搜索功能,支持分页查看结果
🌐 URL 支持 - 支持直接从 URL 读取和操作 PDF 文件
💾 智能缓存机制,相同 URL 的 PDF 自动复用临时文件
安装
从 PyPI 安装
uv add pdf-tools-mcp如果 uv add 遇到依赖冲突,建议使用:
uvx tool install pdf-tools-mcp从源码安装
git clone https://github.com/yourusername/pdf-tools-mcp.git
cd pdf-tools-mcp
uv sync使用方法
与 Claude Desktop 集成
添加到你的 ~/.config/claude/claude_desktop_config.json (Linux/Windows) 或 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
开发/未发布版本配置
{
"mcpServers": {
"pdf-tools-mcp": {
"command": "uv",
"args": [
"--directory",
"<path/to/the/repo>/pdf-tools-mcp",
"run",
"pdf-tools-mcp",
"--workspace_path",
"</your/workspace/directory>",
"--tempfile_dir",
"</your/temp/directory>"
]
}
}
}已发布版本配置
{
"mcpServers": {
"pdf-tools-mcp": {
"command": "uvx",
"args": [
"pdf-tools-mcp",
"--workspace_path",
"</your/workspace/directory>",
"--tempfile_dir",
"</your/temp/directory>"
]
}
}
}注意: 出于安全考虑,此工具只能访问指定工作目录(--workspace_path)内的文件,无法访问工作目录之外的文件。
如果配置后无法正常工作或在UI中无法显示,请通过 uv cache clean 清除缓存。
作为命令行工具
# 基本使用
pdf-tools-mcp
# 指定工作目录和临时文件目录
pdf-tools-mcp --workspace_path /path/to/workspace --tempfile_dir /path/to/temp作为 Python 包
from pdf_tools_mcp import read_pdf_pages, get_pdf_info, merge_pdfs, extract_pdf_pages
# 读取 PDF 页面(支持 URL)
result = await read_pdf_pages("https://example.com/document.pdf", 1, 5)
# 获取 PDF 信息(支持 URL)
info = await get_pdf_info("document.pdf")
# 合并 PDF 文件(支持 URL 和本地文件混合)
result = await merge_pdfs(["file1.pdf", "https://example.com/file2.pdf"], "merged.pdf")
# 提取特定页面
result = await extract_pdf_pages("source.pdf", [1, 3, 5], "extracted.pdf")主要工具函数
1. read_pdf_pages
读取 PDF 文件指定页面范围的内容
参数:
pdf_file_path(str): PDF 文件路径或 URLstart_page(int, 默认 1): 起始页码end_page(int, 默认 1): 结束页码
URL 支持:
支持
http://和https://协议的 URL自动下载 PDF 文件到临时目录
相同 URL 会复用已下载的文件
支持 PDF 文件格式验证
示例:
# 读取本地文件第 1-5 页
result = await read_pdf_pages("document.pdf", 1, 5)
# 读取 URL 中的 PDF 第 10 页
result = await read_pdf_pages("https://example.com/document.pdf", 10, 10)2. get_pdf_info
获取 PDF 文件的基本信息
参数:
pdf_file_path(str): PDF 文件路径或 URL
返回信息:
总页数
标题
作者
创建者
创建日期
3. merge_pdfs
合并多个 PDF 文件
参数:
pdf_paths(List[str]): 要合并的 PDF 文件路径列表(支持 URL 和本地文件混合)output_path(str): 合并后的输出文件路径(必须是本地路径)
4. extract_pdf_pages
从 PDF 中提取特定页面
参数:
source_path(str): 源 PDF 文件路径或 URLpage_numbers(List[int]): 要提取的页码列表(从 1 开始)output_path(str): 输出文件路径(必须是本地路径)
错误处理
工具自动处理以下情况:
负数页码:自动调整为第 1 页
超出 PDF 总页数的页码:自动调整为最后一页
起始页大于结束页:自动交换
文件未找到:返回相应错误信息
权限不足:返回相应错误信息
使用示例
# 获取 PDF 信息
info = await get_pdf_info("sample.pdf")
print(info)
# 读取前 3 页
content = await read_pdf_pages("sample.pdf", 1, 3)
print(content)
# 读取最后一页(假设 PDF 有 10 页)
content = await read_pdf_pages("sample.pdf", 10, 10)
print(content)
# 使用 URL 读取 PDF
content = await read_pdf_pages("https://example.com/sample.pdf", 1, 3)
print(content)
# 合并多个 PDF(混合本地文件和 URL)
result = await merge_pdfs([
"part1.pdf",
"https://example.com/part2.pdf",
"part3.pdf"
], "complete.pdf")
print(result)
# 从 URL 的 PDF 提取特定页面
result = await extract_pdf_pages("https://example.com/source.pdf", [1, 3, 5, 7], "selected.pdf")
print(result)注意事项
页面范围使用包含区间,即起始页和结束页都包含在内
如果指定页面没有文本内容,将被跳过
返回结果会显示 PDF 总页数和实际提取的页面范围
支持各种语言的 PDF 文档
建议一次读取的页面数不超过 50 页,以避免性能问题
URL 支持说明:
支持 HTTP 和 HTTPS 协议的 URL
URL 中的 PDF 会被下载到临时目录(默认:
~/.pdf_tools_temp)相同的 URL 会复用已下载的文件,避免重复下载
下载的文件会进行 PDF 格式验证
输出文件路径(如合并、提取功能)必须是本地路径,不能是 URL
开发
构建
uv build发布到 PyPI
uv publish本地开发
# 安装开发依赖
uv sync
# 运行测试
uv run python -m pytest
# 运行服务器
uv run python -m pdf_tools_mcp.serverRelated MCP server: MCP PDF Reader
English
A FastMCP-based PDF reading and manipulation tool server that supports extracting text content from specified page ranges of PDF files.
Features
📄 Read content from specified page ranges of PDF files
🔢 Support for start and end page parameters (inclusive range)
🛡️ Automatic handling of invalid page numbers (negative numbers, out of range, etc.)
📊 Get basic information about PDF files
🔗 Merge multiple PDF files
✂️ Extract specific pages from PDFs
🔍 Regular expression search functionality with paginated results
🌐 URL Support - Direct support for reading and manipulating PDF files from URLs
💾 Smart caching mechanism to automatically reuse temporary files for the same URLs
Installation
Install from PyPI
uv add pdf-tools-mcpIf uv add encounters dependency conflicts, use:
uvx tool install pdf-tools-mcpInstall from source
git clone https://github.com/yourusername/pdf-tools-mcp.git
cd pdf-tools-mcp
uv syncUsage
Usage with Claude Desktop
Add to your ~/.config/claude/claude_desktop_config.json (Linux/Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
Development/Unpublished Servers Configuration
{
"mcpServers": {
"pdf-tools-mcp": {
"command": "uv",
"args": [
"--directory",
"<path/to/the/repo>/pdf-tools-mcp",
"run",
"pdf-tools-mcp",
"--workspace_path",
"</your/workspace/directory>",
"--tempfile_dir",
"</your/temp/directory>"
]
}
}
}Published Servers Configuration
{
"mcpServers": {
"pdf-tools-mcp": {
"command": "uvx",
"args": [
"pdf-tools-mcp",
"--workspace_path",
"</your/workspace/directory>",
"--tempfile_dir",
"</your/temp/directory>"
]
}
}
}Note: For security reasons, this tool can only access files within the specified workspace directory (--workspace_path) and cannot access files outside the workspace directory.
In case it's not working or showing in the UI, clear your cache via uv cache clean.
As a command line tool
# Basic usage
pdf-tools-mcp
# Specify workspace directory and temporary file directory
pdf-tools-mcp --workspace_path /path/to/workspace --tempfile_dir /path/to/tempAs a Python package
from pdf_tools_mcp import read_pdf_pages, get_pdf_info, merge_pdfs, extract_pdf_pages
# Read PDF pages (URL support)
result = await read_pdf_pages("https://example.com/document.pdf", 1, 5)
# Get PDF info (URL support)
info = await get_pdf_info("document.pdf")
# Merge PDF files (mixed URLs and local files)
result = await merge_pdfs(["file1.pdf", "https://example.com/file2.pdf"], "merged.pdf")
# Extract specific pages
result = await extract_pdf_pages("source.pdf", [1, 3, 5], "extracted.pdf")Main Tool Functions
1. read_pdf_pages
Read content from specified page ranges of a PDF file
Parameters:
pdf_file_path(str): PDF file path or URLstart_page(int, default 1): Starting page numberend_page(int, default 1): Ending page number
URL Support:
Supports
http://andhttps://protocol URLsAutomatically downloads PDF files to temporary directory
Reuses downloaded files for the same URLs
Includes PDF file format validation
Example:
# Read pages 1-5 from local file
result = await read_pdf_pages("document.pdf", 1, 5)
# Read page 10 from URL
result = await read_pdf_pages("https://example.com/document.pdf", 10, 10)2. get_pdf_info
Get basic information about a PDF file
Parameters:
pdf_file_path(str): PDF file path or URL
Returns:
Total page count
Title
Author
Creator
Creation date
3. merge_pdfs
Merge multiple PDF files
Parameters:
pdf_paths(List[str]): List of PDF file paths to merge (supports mixed URLs and local files)output_path(str): Output file path for the merged PDF (must be local path)
4. extract_pdf_pages
Extract specific pages from a PDF
Parameters:
source_path(str): Source PDF file path or URLpage_numbers(List[int]): List of page numbers to extract (1-based)output_path(str): Output file path (must be local path)
Error Handling
The tool automatically handles the following situations:
Negative page numbers: automatically adjusted to page 1
Page numbers exceeding total PDF pages: automatically adjusted to the last page
Start page greater than end page: automatically swapped
File not found: returns appropriate error message
Insufficient permissions: returns appropriate error message
Usage Examples
# Get PDF info
info = await get_pdf_info("sample.pdf")
print(info)
# Read first 3 pages
content = await read_pdf_pages("sample.pdf", 1, 3)
print(content)
# Read last page (assuming PDF has 10 pages)
content = await read_pdf_pages("sample.pdf", 10, 10)
print(content)
# Read PDF from URL
content = await read_pdf_pages("https://example.com/sample.pdf", 1, 3)
print(content)
# Merge multiple PDFs (mixed local files and URLs)
result = await merge_pdfs([
"part1.pdf",
"https://example.com/part2.pdf",
"part3.pdf"
], "complete.pdf")
print(result)
# Extract specific pages from URL PDF
result = await extract_pdf_pages("https://example.com/source.pdf", [1, 3, 5, 7], "selected.pdf")
print(result)Notes
Page ranges use inclusive intervals, meaning both start and end pages are included
Pages without text content will be skipped
Results show total PDF page count and actual extracted page range
Supports PDF documents in various languages
Recommended to read no more than 50 pages at a time to avoid performance issues
URL Support Notes:
Supports HTTP and HTTPS protocol URLs
PDFs from URLs are downloaded to a temporary directory (default:
~/.pdf_tools_temp)Same URLs reuse downloaded files to avoid duplicate downloads
Downloaded files undergo PDF format validation
Output file paths (for merge, extract functions) must be local paths, not URLs
Development
Build
uv buildPublish to PyPI
uv publishLocal Development
# Install development dependencies
uv sync
# Run tests
uv run python -m pytest
# Run server
uv run python -m pdf_tools_mcp.serverLicense
MIT License
Contributing
Issues and Pull Requests are welcome!
Changelog
0.1.4
🌐 URL Support: Add support for reading PDF files directly from URLs
Support for HTTP and HTTPS protocols
Automatic PDF download to temporary directory with UUID naming
Smart caching mechanism to reuse downloaded files for same URLs
PDF format validation (magic bytes, PyPDF2 compatibility check)
URL to temporary file mapping management with JSON storage
⚙️ Configuration: Add
--tempfile_dirparameter for custom temporary directory🔧 Enhanced Functions: All main functions now support URLs:
read_pdf_pages: Read from URLs or local filesget_pdf_info: Get info from URLs or local filessearch_pdf_content: Search in URLs or local filesmerge_pdfs: Merge mixed URLs and local filesextract_pdf_pages: Extract from URLs to local files
📚 Documentation: Updated README with URL usage examples and configuration
0.1.3
Add regex search functionality for PDF content
Add paginated search results with session management
Add search navigation (next/prev/go to page)
Add PDF content caching for improved performance
Add search session cleanup and memory management
0.1.2
Initial release
Support for PDF text extraction
Support for PDF info retrieval
Support for PDF merging
Support for page extraction
Available Tools
9 toolsextract_pdf_pagesA
Extract specific pages from a PDF and create a new PDF.
Supports URLs for source PDF. The source PDF will be downloaded to a temporary
directory if it's a URL. Output path must be a local file path.
Args:
source_path: Path to the source PDF file or URL to PDF
page_numbers: List of page numbers to extract (1-indexed)
output_path: Path where the new PDF will be saved (must be local path)
Returns:
Success message with extraction details or error message
| Name | Required | Description | Default |
|---|---|---|---|
| source_path | Yes | ||
| page_numbers | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses useful behavioral traits: it downloads URLs to a temporary directory, requires a local output path, and returns a success/error message. However, it lacks details on permissions, rate limits, file size constraints, or error handling specifics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by key usage notes and a structured breakdown of args and returns. Every sentence adds value without redundancy, making it efficient and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is mostly complete. It explains inputs and general behavior, and the output schema handles return values, but it could include more on error cases or performance limits for thoroughness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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. It adds meaning beyond the schema by explaining that 'source_path' can be a URL (downloaded temporarily), 'page_numbers' are 1-indexed, and 'output_path' must be local. It covers all three parameters but could provide more detail on formats or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('extract specific pages from a PDF and create a new PDF'), identifies the resource (PDF), and distinguishes it from siblings like 'merge_pdfs' (which combines PDFs) and 'read_pdf_pages' (which likely reads content without creating a new file).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool (extracting pages to create a new PDF) and mentions support for URLs, but does not explicitly state when not to use it or name alternatives among siblings (e.g., 'merge_pdfs' for combining PDFs or 'read_pdf_pages' for just reading).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pdf_infoA
Get basic information about a PDF file including page count.
Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.
Args:
pdf_file_path: Path to the PDF file or URL to PDF
Returns:
Basic information about the PDF file
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_file_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: it's a read-only operation (implied by 'Get'), supports multiple input types, and includes caching for URLs. It could improve by mentioning error handling or performance limits, but covers essential traits well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by usage details and parameter/return sections. Every sentence adds value without redundancy, making it efficient and easy to parse for an AI agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter), no annotations, and the presence of an output schema (which handles return values), the description is complete enough. It covers purpose, usage context, parameter semantics, and behavioral traits, leaving no critical gaps for effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, so the description must compensate. It adds meaningful semantics by explaining that 'pdf_file_path' can be a local path or URL, and clarifies the caching behavior for URLs. This goes beyond the schema's basic type definition, though it could detail format constraints or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Get') and resource ('basic information about a PDF file'), including the key detail of page count. It distinguishes itself from siblings like 'extract_pdf_pages' or 'search_pdf_content' by focusing on metadata retrieval rather than content manipulation or searching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for usage by specifying it supports both local file paths and URLs, with caching behavior for URLs. However, it does not explicitly state when to use this tool versus alternatives like 'search_pdf_info' or other siblings, leaving some ambiguity in tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
merge_pdfsA
Merge multiple PDF files into one.
Supports both local file paths and URLs. URLs will be downloaded to temporary
files before merging. Mixed local and URL paths are supported.
Args:
pdf_paths: List of paths to PDF files to merge (in order) - can include URLs
output_path: Path where the merged PDF will be saved (must be local path)
Returns:
Success message with merge details or error message
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_paths | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context beyond basic function, such as that URLs are downloaded to temporary files and the output must be a local path. However, it lacks details on permissions, error handling, or rate limits, which are important for a tool that processes external resources.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by supporting details and parameter explanations. Each sentence earns its place by providing essential information without redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (merging files with external inputs), no annotations, and an output schema present, the description is mostly complete. It covers input semantics and behavioral context but could benefit from more details on error cases or performance limits to fully guide the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, so the description must fully compensate. It effectively explains both parameters: 'pdf_paths' as a list of paths in order that can include URLs, and 'output_path' as a local path for saving the merged PDF. This adds clear meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('merge multiple PDF files into one') and identifies the resource ('PDF files'). It distinguishes this tool from sibling tools like 'extract_pdf_pages' or 'get_pdf_info' by focusing on combining files rather than extracting, reading, or searching content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use this tool by specifying it handles 'both local file paths and URLs' and supports 'mixed local and URL paths.' However, it does not explicitly state when not to use it or name alternatives among siblings, such as using 'extract_pdf_pages' for partial operations instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_pdf_pagesA
Read content from PDF file for specified page range.
Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.
Note: Avoid reading too many pages at once (recommended: <50 pages) to prevent errors.
Args:
pdf_file_path: Path to the PDF file or URL to PDF
start_page: Starting page number (default: 1)
end_page: Ending page number (default: 1)
Returns:
Extracted text content from the specified pages
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_file_path | Yes | ||
| start_page | No | ||
| end_page | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: support for local paths and URLs, downloading and caching for URLs, and a warning about page limits to prevent errors. This covers operational constraints and side effects, though it could add more on error handling or performance implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by supporting details, usage notes, and parameter explanations. Every sentence adds value, such as the caching behavior and page limit warning, with no redundant or wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity, no annotations, and an output schema present (which handles return values), the description is complete enough. It covers purpose, usage, behaviors, and parameters, providing sufficient context for an agent to invoke the tool correctly without needing to explain return values explicitly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining all three parameters: 'pdf_file_path' as path or URL, 'start_page' and 'end_page' as page numbers with defaults. It adds meaning beyond the bare schema by clarifying URL handling and default values, though it could detail format specifics like URL protocols or page numbering conventions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'read content from PDF file' and specifies the resource 'PDF file for specified page range', making the purpose explicit. It distinguishes from siblings like 'extract_pdf_pages', 'merge_pdfs', and 'search_pdf_content' by focusing on reading text content rather than extraction, merging, or searching operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: reading content from PDFs with local paths or URLs, and includes a recommendation to avoid reading too many pages (<50). However, it does not explicitly state when not to use it or name specific alternatives among the sibling tools, such as when to choose 'get_pdf_info' for metadata instead.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pdf_contentA
Search for regex pattern in PDF content and return paginated results.
Supports both local file paths and URLs. For URLs, the PDF will be downloaded
to a temporary directory and cached for future use.
Args:
pdf_file_path: Path to the PDF file or URL to PDF
pattern: Regular expression pattern to search for
page_size: Number of results per page (10-50, default: 10)
Returns:
Search results with UUID for pagination, or error message
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_file_path | Yes | ||
| pattern | Yes | ||
| page_size | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the tool searches PDF content using regex, supports local files and URLs, downloads and caches URLs temporarily, returns paginated results with a UUID for pagination, and includes error handling. It also specifies the page size range (10-50) and default (10). This covers most operational aspects, though it could mention performance or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose. Each sentence adds value: the first states the action, the second explains input sources, and the parameter and return sections provide necessary details without redundancy. The structure is clear and efficient, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is mostly complete. It covers purpose, usage, parameters, and returns, and the output schema likely handles return value details. However, it could improve by mentioning sibling tools for context or providing more on error cases, but it's sufficient for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter: 'pdf_file_path' as 'Path to the PDF file or URL to PDF', 'pattern' as 'Regular expression pattern to search for', and 'page_size' as 'Number of results per page (10-50, default: 10)'. This clarifies usage and constraints, compensating well for the schema's lack of descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search for regex pattern in PDF content and return paginated results.' It specifies the verb ('search'), resource ('PDF content'), and method ('regex pattern'), distinguishing it from siblings like 'extract_pdf_pages' or 'get_pdf_info' that perform different operations on PDFs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for usage: 'Supports both local file paths and URLs. For URLs, the PDF will be downloaded to a temporary directory and cached for future use.' This helps users understand when to use it (for searching content in PDFs from various sources). However, it does not explicitly state when not to use it or mention alternatives among the sibling tools, such as 'search_pdf_go_page' for navigation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pdf_go_pageA
Go to specific page of search results.
Args:
search_id: Search session ID from previous search
page_number: Page number to go to (1-indexed)
Returns:
Specified page of search results or error message
| Name | Required | Description | Default |
|---|---|---|---|
| search_id | Yes | ||
| page_number | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'Specified page of search results or error message,' which gives some insight into outcomes. However, it lacks details on error conditions, pagination behavior (e.g., total pages, what happens if page_number is out of range), or performance aspects. It adds basic context but is incomplete for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is highly concise and well-structured: a clear purpose statement followed by bullet-point-like sections for 'Args' and 'Returns.' Every sentence earns its place by providing essential information without redundancy. It's front-loaded with the core functionality and efficiently details parameters and outcomes.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no annotations, but has an output schema), the description is reasonably complete. It explains the purpose, parameters, and return behavior. The output schema likely covers return values, so the description doesn't need to detail them further. However, it could improve by addressing error scenarios or sibling tool differentiation, keeping it from a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that 'search_id' is a 'Search session ID from previous search' and 'page_number' is 'Page number to go to (1-indexed),' clarifying the purpose and format of both parameters. This compensates well for the schema's lack of descriptions, though it doesn't cover edge cases like invalid IDs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Go to specific page of search results.' It specifies the verb ('Go to') and resource ('page of search results'), but doesn't explicitly differentiate from siblings like 'search_pdf_next_page' or 'search_pdf_prev_page' beyond the 'specific page' aspect. The purpose is clear but sibling differentiation is only implicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context through the 'search_id' parameter description ('Search session ID from previous search'), suggesting this tool should be used after initiating a search. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'search_pdf_next_page' or 'search_pdf_prev_page', nor does it mention prerequisites or exclusions. Usage is implied but not fully articulated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pdf_infoC
Get information about a search session.
Args:
search_id: Search session ID from previous search
Returns:
Information about the search session
| Name | Required | Description | Default |
|---|---|---|---|
| search_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get information' but doesn't clarify what type of information (e.g., status, results, metadata), whether it's read-only or has side effects, or any constraints like rate limits. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with three sentences that cover purpose, parameter, and return value. It's front-loaded with the main function, though the 'Args' and 'Returns' sections could be integrated more smoothly rather than as separate labeled lines.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema (which handles return values), 1 parameter with low schema coverage, and no annotations, the description is minimally adequate. It covers the basic purpose and parameter meaning but lacks behavioral details and usage guidelines, making it incomplete for optimal agent understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With only 1 parameter and 0% schema description coverage, the description adds meaningful context by explaining that 'search_id' is a 'Search session ID from previous search'. This clarifies the parameter's purpose beyond the schema's minimal title ('Search Id'), though it doesn't specify format or validation rules.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool 'Get information about a search session', which is a clear verb+resource combination. However, it doesn't distinguish this tool from its siblings like 'search_pdf_content' or 'search_pdf_go_page', leaving ambiguity about what specific 'information' it provides versus other search-related tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It mentions 'search session ID from previous search', implying a prerequisite, but doesn't specify which sibling tool creates that ID or when to choose this over other search tools like 'search_pdf_content' for different purposes.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pdf_next_pageB
Get next page of search results.
Args:
search_id: Search session ID from previous search
Returns:
Next page of search results or error message
| Name | Required | Description | Default |
|---|---|---|---|
| search_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool returns 'Next page of search results or error message,' which gives some insight into outcomes, but lacks details on error conditions, pagination behavior (e.g., what happens if no next page exists), rate limits, or authentication needs. This leaves gaps for an agent to understand operational nuances.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by brief sections for arguments and returns. Every sentence earns its place by providing essential information without redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (pagination operation), no annotations, and an output schema present (which handles return values), the description is reasonably complete. It covers the purpose, parameter semantics, and return outcomes, though it could benefit from more behavioral context like error handling or pagination limits to be fully comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning beyond the input schema by explaining that 'search_id' is a 'Search session ID from previous search,' clarifying its purpose and origin. With 0% schema description coverage, this compensates somewhat, but it doesn't detail the format or constraints of the ID. Since there's only one parameter, the baseline is 4, but the limited semantic enhancement reduces the score to 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get next page of search results.' It specifies the verb ('Get') and resource ('next page of search results'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from its sibling 'search_pdf_prev_page' beyond the directional implication in the name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'Search session ID from previous search,' suggesting this tool should be used after an initial search. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'search_pdf_prev_page' or 'search_pdf_go_page,' nor does it specify any prerequisites or exclusions beyond the implied sequence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_pdf_prev_pageB
Get previous page of search results.
Args:
search_id: Search session ID from previous search
Returns:
Previous page of search results or error message
| Name | Required | Description | Default |
|---|---|---|---|
| search_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that it returns 'previous page of search results or error message,' which gives some insight into outcomes, but lacks details on error conditions, pagination behavior (e.g., what happens if no previous page exists), rate limits, or authentication needs. This is inadequate for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with a clear purpose statement followed by brief sections for arguments and returns. Every sentence adds value, and there's no unnecessary information. However, it could be slightly more front-loaded by integrating the return info into the main description for better flow.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (pagination in search results), no annotations, and an output schema exists (which handles return values), the description is minimally complete. It covers the basic purpose and parameter but lacks details on behavioral aspects like error handling or usage context, leaving gaps that could hinder an AI agent's effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds minimal semantics beyond the input schema. It explains that 'search_id' is a 'Search session ID from previous search,' which clarifies its purpose, but the schema description coverage is 0%, and with only one parameter, the baseline is 4. However, it doesn't fully compensate by detailing format or constraints, so it scores slightly below baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get previous page of search results.' It specifies the verb ('Get') and resource ('previous page of search results'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'search_pdf_next_page' or 'search_pdf_go_page', which handle similar pagination functions, so it misses full sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by mentioning 'search session ID from previous search,' suggesting it should be used after initiating a search. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'search_pdf_next_page' or 'search_pdf_go_page,' nor does it specify any exclusions or prerequisites beyond the search_id parameter.
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.
9 tool updates
v0.1.4- First observed
extract_pdf_pages - First observed
get_pdf_info - First observed
merge_pdfs - First observed
read_pdf_pages - First observed
search_pdf_content - First observed
search_pdf_go_page - First observed
search_pdf_info - First observed
search_pdf_next_page - First observed
search_pdf_prev_page
TDQS
Most tools have distinct purposes, but the search-related tools (search_pdf_content, search_pdf_go_page, search_pdf_info, search_pdf_next_page, search_pdf_prev_page) could be confusing as they form a tightly coupled set for pagination. The core PDF operations (extract, merge, read, get info) are clearly differentiated.
All tools follow a consistent snake_case verb_noun pattern (e.g., extract_pdf_pages, merge_pdfs, search_pdf_content). The naming is predictable and readable throughout the set, with clear action-object relationships.
9 tools is reasonable for a PDF-focused server, but the 5 search-related tools might feel slightly heavy compared to the 4 core PDF manipulation tools. The count is well-scoped overall, though some search tools could potentially be consolidated.
The server covers essential PDF operations (extract, merge, read, get info) and adds advanced search with pagination. Minor gaps include no PDF creation from scratch or editing capabilities, but the core workflows for analysis and manipulation are well-covered.
Maintenance
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
PDF URLs to per-page text, tables as rows, Markdown, metadata and OCR for scanned pages.
1Convert and compress PDFs and images, redact personal data, and run text and data utilities.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
PDF tools + invoice extraction, bank statement parsing, GST reconciliation & GSTIN validation.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables processing and analysis of large PDF files through text extraction, search functionality, and intelligent chunking strategies. Provides comprehensive PDF operations including metadata retrieval, page-range text extraction, and content search with contextual results.-
- AlicenseAqualityCmaintenanceA Model Context Protocol server that enables the extraction of text, metadata, and embedded images from PDF files. It provides tools for searching text with context, reading specific pages, and counting total pages within a document.7101MIT
- FlicenseAqualityDmaintenanceA server designed for processing PDF documents, enabling text extraction, table data retrieval, and metadata collection from local files. It allows users to scan directories for PDFs and read specific pages, specifically optimized for thesis literature analysis.3-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to read, search, and analyze PDF files from local paths or URLs. It provides tools for extracting specific page ranges, searching for terms, and retrieving document metadata.4461MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/lockon-n/pdf-tools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server