Skip to main content
Glama

Split a PDF

split_pdf

Cuts a PDF into parts, every N pages each or one part per entry of ranges, and returns the render with download_url: a ZIP of the parts, named after the source (contract-1.pdf, contract-2.pdf and so on), or the PDF itself when there is one part. get_pdf_info gives the page count first. Pass exactly one PDF: source, a render or library file of the workspace, or file_base64, the PDF itself. Starter plan and above; 0.5 units on a live key. A PDF/A or a password-protected PDF is refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "split_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
everyNoPages per part; give every or ranges
rangesNoOne part per entry, each a page selection such as 1-3,5, or 4- for page 4 to the last; give every or ranges
sourceNoA PDF of the workspace: the rnd_ id of a PDF render, or a PDF of the file library by name (such as terms.pdf) or fil_ id
filenameNoName of the file behind download_url; the source's name when left out
file_nameNoName of the PDF given as file_base64 or path, e.g. contract.pdf; the results are named after it
file_base64NoThe PDF itself, base64 encoded, up to 20 MB; sent with the request and not kept

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
formNoWhat fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran
pdfaNoThe PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it
errorYesWhy a failed render failed
unitsYesUnits the render counted
outputNoThe format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses cost and gating (0.5 units on a live key, Starter plan), the exact refusal cases (PDF/A, password-protected), the output shape (ZIP named contract-1.pdf, contract-2.pdf, or a bare PDF for a single part), and that base64 input is not retained. The annotations only tell the agent this is a non-read-only, non-destructive local operation, so this added context is genuinely valuable.

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?

Front-loaded with the outcome and the output contract before constraints, and almost every clause carries information (modes, naming, input choice, plan, cost, refusals). The first sentence is long and comma-chained, which costs some readability, but there is no filler.

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

Completeness5/5

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

For a 6-parameter tool with an output schema, the description covers the mode selection, input exclusivity, output naming, cost, and error conditions an agent would otherwise have to discover by trial. Nothing material needed to call it correctly appears to be missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds a constraint the schema does not express: exactly one input source must be supplied ('Pass exactly one PDF: source, a render or library file of the workspace, or file_base64'). It also clarifies the every-vs-ranges choice and the naming behaviour of filename/file_name beyond their field text.

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?

States a specific verb and resource ('Cuts a PDF into parts') and immediately names both splitting modes: fixed size ('every N pages each') or explicit page selections ('one part per entry of ranges'). The sibling get_pdf_info is named with its role, so an agent can distinguish this from page-inspection and other PDF tools.

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?

Gives concrete preconditions and sequencing ('get_pdf_info gives the page count first', 'Pass exactly one PDF: source ... or file_base64') plus eligibility ('Starter plan and above'). It does not explicitly steer away from compress_pdf/pdf_to_image, but the when-to-use context is clear enough to act on.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources