Skip to main content
Glama
pdf4me
by pdf4me

parse_document

Parse a PDF using a PDF4me template to extract structured data into a JSON file. Provide the PDF path and template ID or name.

Instructions

Parse a PDF with a PDF4me parse template via ParseDocument (/api/v2/ParseDocument). Requires pdf_file_path, doc_name (or uses PDF basename), parse_id (or auto-generated UUID), and either template_id (GUID) or template_name. Saves parsed_document.json under output_dir.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parse_idNo
output_dirNo
template_idNo
pdf_file_pathYes
template_nameNo
request_doc_nameNo
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does reveal that the tool saves parsed_document.json to output_dir and mentions auto-generation of parse_id and doc_name fallback. However, it does not state safety traits (e.g., read-only, no modification of input) or error/edge-case behavior, which would be 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?

The description is concise, with two sentences, and front-loads the core action. The second sentence packs a lot of parameter details, but remains readable. It avoids unnecessary fluff, though the parameter listing could be better formatted.

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

Completeness3/5

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

Given the tool has 6 parameters, no output schema, and no annotations, the description covers the main inputs and output location, but omits details like default behavior for output_dir, error scenarios, and the structure of the parsed document. The parameter name mismatch further reduces completeness.

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?

The description attempts to explain parameter semantics (e.g., doc_name fallback, template_id vs template_name, auto-generated parse_id) but contains a critical mismatch: it refers to 'doc_name' while the actual schema parameter is 'request_doc_name'. This could mislead the agent. Schema coverage is 0%, so the description must compensate, but the inaccuracy undermines its utility.

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: 'Parse a PDF with a PDF4me parse template' via a specific API endpoint. It identifies the resource (PDF) and distinguishes it from sibling tools like extract_text_from_pdf or process_* by mentioning the template-based parsing mechanism.

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

Usage Guidelines2/5

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

The description lists required parameters but does not explain when to use this tool over alternatives such as extract_text_from_pdf or the process_* tools. There is no mention of exclusions or alternative tool references, leaving the agent without clear guidance on tool selection.

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