Skip to main content
Glama

split_pdf

Read-onlyIdempotent

Cut a PDF into multiple PDFs by page range, returning each part's page count, size, and base64 content. Use it to isolate chapters, appendices, or create page-limited uploads.

Instructions

Split a PDF into multiple PDF documents by page range. Each part comes back with its page count, size and base64 content (parts up to 5 MB), ready to be fed into other doc2md tools or written to a file. Use it to break a large report into chapters, isolate an appendix, or prepare page-limited uploads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead.
rangesNoPage ranges to cut, 1-based and inclusive, e.g. '1-3,5,8-10'. Each range becomes one output PDF. Max 20 parts per call.
filenameNoOriginal filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically.
passwordNoPassword for encrypted PDFs. Empty for normal files.
file_base64NoBase64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, covering safety. The description adds valuable behavioral context: it specifies the output format (page count, size, base64 content) and a size limit (up to 5 MB per part). This goes beyond the annotations and helps the agent understand what to expect from the call.

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 two sentences, front-loads the core action, and includes output details and use cases without redundancy. Every sentence earns its place—there is no fluff, and the structure is logical: what it does, what it returns, and when to use it.

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

Completeness4/5

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

With no output schema, the description must explain return values, and it does: it specifies each part's page count, size, and base64 content. It also mentions the size limit and compatibility with other tools. It doesn't cover error handling or explicitly mention the max 20 parts per call, but that is captured in the schema's ranges description, so the agent has access to it. Given the tool's simplicity and existing schema coverage, the description is nearly complete.

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

Parameters3/5

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

The schema provides 100% description coverage for all five parameters, so the baseline is 3. The tool description does not add parameter-specific details beyond what the schema already states; it only mentions 'by page range' and output structure, which is not directly tied to individual parameters. The schema already explains the url/file_base64 trade-off and the ranges format, so the description adds no extra semantic value.

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: 'Split a PDF into multiple PDF documents by page range,' which is a specific verb and resource. It distinguishes from siblings by focusing on splitting by page ranges, whereas siblings handle merging, converting, extracting tables, etc. The output details (page count, size, base64 content) further clarify the function.

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

Usage Guidelines4/5

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

The description provides explicit use cases: 'break a large report into chapters, isolate an appendix, or prepare page-limited uploads.' This gives clear context for when to use the tool. It doesn't explicitly name alternatives or exclusions, but the use cases are specific enough to guide an agent. It also hints at integration with 'other doc2md tools,' which aids decision-making.

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