Skip to main content
Glama
pdf4me
by pdf4me

split_pdf_by_text

Split a PDF into separate files at each occurrence of a specified text, with page breaks placed before or after the match.

Instructions

Split a PDF by matching text via PDF4me SplitByText (/api/v2/SplitByText). Provide pdf_file_path, text, split_text_page (before/after), and file_naming.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
output_dirNo
file_namingNoNameAsPerOrder
pdf_file_pathYes
split_text_pageNoafter
request_doc_nameNo
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It lists parameters to provide but does not explain what happens when the text is not found, how output files are named, whether the original PDF is modified, or any error behavior. The only behavioral hint is 'split_text_page (before/after)', which indicates placement relative to the matched text, but this is minimal.

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?

The description is a single, readable sentence that quickly conveys the tool's purpose and key parameters. The inclusion of the API path is slightly extraneous for an agent, but it is not verbose or confusing. No unnecessary repetition.

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

Completeness2/5

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

For a tool with six parameters, no annotations, and no output schema, the description is incomplete. It does not explain return values, output file behavior, error handling, or prerequisites (e.g., whether the PDF must contain searchable text). It also does not differentiate from sibling split tools, making it difficult for an agent to fully understand the tool's context and consequences.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions four of six parameters (pdf_file_path, text, split_text_page, file_naming) and clarifies split_text_page values. However, it omits output_dir and request_doc_name, which are significant – especially output_dir, which determines where the split files are written. The description adds only marginal meaning beyond the schema's parameter names.

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 tool's function: 'Split a PDF by matching text' – a specific verb + resource + method. It also references the underlying API endpoint, and the phrase 'by matching text' distinguishes it from sibling tools like split_pdf or split_pdf_by_barcode.

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

Usage Guidelines3/5

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

Usage is implied by the phrase 'by matching text', suggesting this tool is for splitting at text occurrences rather than page numbers or barcodes. However, it does not explicitly state when to use this tool over alternatives or provide any exclusion criteria, such as 'use split_pdf for page ranges instead'.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server