pdf-toolbox-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PDF_TOOLBOX_TESS_LANG | No | Default OCR languages; missing packs auto-fallback (flagged via lang_fallback). | chi_sim+eng |
| PDF_TOOLBOX_WORKSPACE | No | If set, all writes are confined to this directory; system dirs are always denied. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| tool_pdf_infoA | 获取 PDF 元信息:页数、是否加密、页面尺寸、标题作者等。处理任何 PDF 前先调用此工具。 |
| tool_extract_textB | 提取 PDF 文本(pdftotext)。pages 精确页范围如 '1-3,5';layout 保持版面;per_page 按页返回。 |
| tool_ocr_pdfA | 对扫描件 OCR 并把文本层写回,产出可搜索 PDF(输出 _ocr.pdf)——本工具箱的核心差异化能力。 默认跳过已有文本层的页;默认语言 chi_sim+eng(缺语言包时自动降级并在结果中说明)。 |
| tool_render_pagesB | 渲染指定页为 PNG。return_images=True 时直接返回图像内容块(供视觉查看复杂版面/图表/扫描页)。 |
| tool_unlock_pdfA | 用密码解锁加密 PDF,输出解密文件。user(打开)密码即可,无需 owner 密码。解锁后再走其他工具。 |
| tool_split_pdfA | 拆分 PDF:ranges='1-3,5' 按区间出文件,或 every_n=N 每 N 页一段。二者二选一。 |
| tool_merge_pdfsA | 按传入顺序合并多个 PDF 为一个文件。 |
| tool_rotate_pagesB | 旋转页面 90/180/270 度。pages 缺省旋转全部页。 |
| tool_protect_pdfB | AES-256 加密(对外分发)。user_password 留空 = 打开无密码、仅权限限制;权限默认可打印可复制、不可修改。 |
| tool_is_searchableA | 智能路由入口:判断 PDF 是否已有可提取文本层,返回建议动作(extract_text 或先 ocr_pdf)。不确定时先调这个。 |
| tool_list_fontsA | 字体体检:列出字体与嵌入状态,未嵌入字体跨设备查看/打印可能缺字。 |
| tool_extract_imagesB | 抽取 PDF 内嵌图片为 PNG;list_only=true 只返回图片清单不落盘。 |
| tool_extract_attachmentsB | 抽取 PDF 内嵌附件文件到指定目录。 |
| tool_check_repairC | 结构体检(语法/流编码);repair=true 尝试重建输出修复版文件。 |
| tool_linearizeB | Web 优化:输出渐进加载版,适合在线浏览的发布文件。 |
| tool_batch_ocrB | 批量 OCR 写回:inputs 为文件路径或目录(取全部 PDF)。单文件失败不中断,逐文件返回结果。 |
| tool_sanitizeA | 发布版脱敏:剥离 JS/OpenAction/元数据/附件(可选注释)。正文文本不动——防元数据与隐藏对象泄密。 |
| tool_redactA | 真涂黑(安全级):regions=[{page,x,y,w,h}](PDF 点、左上原点)。含涂黑区域的页被光栅化—— 被涂文字物理删除,复制/提取/文本层均无法恢复;其余页保留原文本层。 rasterize_all=true 全文档光栅化(最高防护档)。 |
| tool_locate_textA | 定位文本出现的页面与坐标框(PDF 点、左上原点)——找内容在哪、给 redact 量坐标的地基。 中文无分词、英文跨词均可命中(NFKC 归一化去空白匹配)。 |
| tool_redact_textA | 按内容真涂黑:自动定位每个关键词的全部出现处并涂黑(无需手工量坐标)。 如"把所有合同编号涂掉"。被涂页光栅化、文字物理删除;其余页保留文本层。 |
| tool_fill_formB | 填写 AcroForm 表单(字段名→字符串/布尔)。未匹配字段在 missing 中返回。 |
| tool_edit_metadataA | 编辑元数据(docinfo+XMP 双写);clear=true 清空全部——对外发布前配合 sanitize 使用。 |
| tool_compress_pdfA | 压缩 PDF(ghostscript,有损:图像重采样)。target_mb 给定时沿 ebook→screen 下探直到达标(尽力而为)。 |
| tool_dependency_statusA | 探测系统依赖(qpdf/poppler/tesseract/ghostscript)与安装命令。工具报 missing_dependency 时先看这里。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/twoer/pdf-toolbox-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server