MCP server for PDF manipulation operations including merging PDFs and extracting pages
This server has critical gaps in schema quality, parameter documentation, and error handling. Both tools are explicitly registered via @mcp.tool() decorator and have visible implementations, but lack proper structured schemas and comprehensive error handling. The merge_pdfs and extract_pages tools have docstrings in Chinese that describe intent but fail to provide actionable parameter constraints, output schemas, or recovery guidance. Input parameters are described as free-form strings without type validation, enum constraints, or format specifications. Error handling consists of print statements rather than structured error responses. The server does not validate inputs or guide LLM recovery from common failure modes (missing files, invalid page ranges, disk space exhaustion).
提取 PDF 文件中指定的若干页面 使用示例:请提取 e:/AQA-AS Math PSM.pdf文件的第10到第20页,以及第23页,第30-35页,保存到e:/2.pdf
将多个pdf文件合并为一个pdf文件 使用示例:合并e:/1.pdf和e:2.pdf,保存到e:/3.pdf
No input schema type definitions visible. Both tools accept string parameters without declared types, min/max length, regex patterns, or enum constraints. Input validation occurs inside tool implementations (print statements on missing files) rather than being declared to the LLM.
Descriptions lack actionable format specifications. 'pdf file complete path' does not specify Windows vs Unix path syntax, whether forward/backslashes are accepted, or example valid formats. 'pages_to_extract' says '1-3,5,7-9' as example but does not formally constrain the format (no regex, no enum). LLMs infer formats from examples, risking malformed input.
No output schema documented. Neither tool declares what it returns on success. Callers do not know if the response is a JSON object, a success message, or null. LLMs cannot chain outputs to downstream tools when schema is undocumented.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 44 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 38 | - | v1 |
Error handling via print statements, not structured responses. When a file does not exist, extract_pages prints to stdout and returns None implicitly. merge_pdfs continues on missing files silently. LLMs receive no structured error categorization, no actionable recovery guidance, and no indication of partial vs complete failure.
No validation or error classification for destructive operations. Both tools write files to disk (WRITE risk). No confirmation step, dry-run option, or permission check. extract_pages silently ignores out-of-range page numbers. merge_pdfs overwrites output_file without warning. Agents cannot know if an operation succeeded partially or fully.
Parameter descriptions contain example values (e.g., 'e:/1.pdf') that LLMs may reuse literally in real calls instead of adapting to the user's actual file paths. No guidance on how to map user intent ('merge my two homework PDFs') to parameter format.
No pagination, result limit, or result count for outputs. If extract_pages or merge_pdfs returns metadata, the schema and limits are not documented. Tools operating on large files (thousands of pages) risk timeouts or context explosion.
Descriptions in Chinese. While documentation is provided, it is not in English, limiting accessibility for non-Chinese-speaking agents and developers. Tool descriptions should be in the language of the LLM's training data (typically English) for reliable selection and parameter inference.