Skip to main content
Glama

Cut a PDF into parts

tarkle_split_document

Cut one PDF (fileId from tarkle_list_files) that holds several documents into separate PDFs, one per document, saved into the workspace's Split parts folder. Three ways: (1) send parts ([{ title, pages: [1,2,3] }]: every page in one part at most, in the order to write them) to cut now, which costs nothing and answers with the new files; (2) send sections ([{ name: 'Invoice', description: 'a bill with a total to pay', partitionKey: 'invoice number' }], up to 20; the partitionKey is what tells two documents of the same kind apart, so two invoices in a row become two parts; optional rules change how pages are assigned) to have the pages classified: this spends credits (about 21 a page), returns a runId, and the suggested parts are read with tarkle_get_extraction a few seconds later; (3) send the runId of a finished suggestion (optionally with your own parts) to write its parts as files. Each new file can then be read with tarkle_extract_data. Only a PDF; a password-protected or unreadable file is refused. Only files this person can open are cut.

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": {
      "workspaceId": "<workspaceId>"
    },
    "name": "tarkle_split_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
partsNoThe cut to make: a title and the pages (1 is the first) of each part.
rulesNoWith sections: your own rules for where documents begin and end (for example 'keep every contract together'). Leave out for the default.
runIdNoA finished suggestion: write its parts (or the parts you send) as files.
fileIdNoThe PDF to cut (from tarkle_list_files). Not needed with a runId.
sectionsNoKinds of document to look for. Spends credits.
llm_modelNoThe model identifier you are running as, for example "claude-opus-4-8" or "gpt-5.2". Pass "unknown" if you are not certain. Recorded for the server developer's analytics.
tableCutoffNoWith sections: preserve reads whole tables when classifying (slower; for identifiers deep inside long tables).
workspaceIdYesThe workspace's id, from tarkle_list_workspaces.

Output Schema

NameRequiredDescriptionDefault
filesNo
pagesNo
runIdNo
noticeNo
statusNo
creditsNo
folderIdNo

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), and the description goes well beyond them: per-page credit cost (about 21 a page) for the sections path, an asynchronous runId round-trip with a few-second latency, the destination folder, and refusal of password-protected or unreadable files. The one gap is that it never says whether the original PDF is left intact, which matters for an operation that produces new files.

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 core action and destination, then structured as a numbered list of the three modes, which matches how an agent must choose. It is dense and long, and the parenthesized example objects add bulk that the schema already carries, but almost every clause conveys operational information.

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 an 8-parameter, multi-mode, credit-spending tool, this covers what an agent needs: which mode to pick, what each costs, what comes back synchronously versus via runId, and which sibling tool continues the workflow. An output schema exists, so the description is not obligated to describe return structure, and its mention of runId and new files is sufficient signposting.

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 cross-parameter semantics the schema cannot express: parts/sections/runId are mutually exclusive modes, partitionKey is what separates consecutive same-kind documents into distinct parts, rules only apply with sections, and fileId is unnecessary when a runId is given. It does not cover llm_model or tableCutoff, though the schema's own text does.

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 (cut one PDF into separate PDFs) and immediately bounds the scope: one PDF holding several documents, output saved to the workspace's Split parts folder. It even enumerates the three operating modes, so an agent can tell this apart from tarkle_extract_data, tarkle_edit_pdf, and tarkle_convert_file without opening a schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use routing for all three modes: parts for cutting now (free, synchronous), sections for classification (costs credits, returns a runId), runId to materialize a finished suggestion. It names the follow-up tools (tarkle_get_extraction to read suggestions, tarkle_extract_data to read the new files, tarkle_list_files for the fileId) and states the precondition that only readable PDFs are accepted.

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.