Skip to main content
Glama

Split or extract PDF pages

pdf_split

Keep only the selected pages of a PDF (e.g. ranges "1-3,5" or "2-4,7-9") and return the resulting document. Use this when the user wants part of a PDF or pages extracted.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>",
      "ranges": "<ranges>"
    },
    "name": "pdf_split"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesBase64-encoded file bytes (no data: URL prefix).
rangesYesPage ranges to keep, e.g. "1-3,5".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false. The description adds that the operation returns the resulting document and describes the keep-selection semantics, but does not clarify that the source PDF is left untouched, the output encoding, or handling of out-of-range pages. Useful but not rich behavioral context beyond annotations.

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?

Two sentences, zero filler, with the core operation stated first and the usage cue second. Nothing redundant.

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?

For a two-parameter tool with full schema coverage and annotations covering the safety profile, the description is nearly complete. The one gap is the return format: with no output schema and only 'return the resulting document', an agent cannot tell whether it receives base64 bytes, a file reference, or a link.

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?

Schema description coverage is 100%, so both parameters are already documented in the schema, and the description's range examples ('1-3,5', '2-4,7-9') largely duplicate the schema's own example. Baseline 3 applies since the schema carries the semantic load.

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 ('Keep only the selected pages of a PDF ... and return the resulting document'), which is precisely distinguishable from siblings like pdf_merge (combining) and pdf_extract_text (text, not pages). The range-syntax example reinforces exactly what operation is being performed.

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 a clear usage condition: 'Use this when the user wants part of a PDF or pages extracted.' It does not, however, name an alternative or state when not to use it (e.g., versus pdf_extract_text or pdf_merge), so the routing guidance is contextual rather than exhaustive.

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