Skip to main content
Glama
pdf4me
by pdf4me

flatten_pdf

Flatten a PDF by converting forms, annotations, and layers into static content. Provide the local file path, and optionally set the output directory and file name.

Instructions

Flatten a PDF file with the PDF4me API: forms, annotations, and layers become static content. Provide the local file path to the PDF. Optionally specify an output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the PDF file to flatten.
output_dirNo
output_file_nameNo
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains the core transformation (content becomes static), which is valuable. However, it does not disclose whether the original file is modified, what the output defaults are (e.g., where the flattened file is written if no output_dir is given), or any potential side effects like loss of editability. This partial transparency is adequate but not comprehensive.

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?

The description is concise and well-structured, consisting of two sentences that front-load the purpose and then provide parameter instructions. Every sentence earns its place, and there is no redundant filler.

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?

The tool has no output schema, so the description should explain what the tool returns or how the result is indicated. It does not mention return values, error conditions, or the fate of the original file. Additionally, while the core action is clear, the lack of detail about output defaults and post-conditions leaves the agent uncertain about the tool's complete behavior. The description is adequate for a simple tool but leaves significant gaps.

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 low (only 33% for file_path). The description mentions all three parameters but adds little beyond their names: 'Provide the local file path' and 'Optionally specify an output directory and output file name.' It does not clarify how output_dir and output_file_name interact, what happens if output_file_name lacks an extension, or what the default output name/directory is. Given the low coverage, the description should compensate with more detail but does not.

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 specifies the action ('Flatten a PDF file') and the effect ('forms, annotations, and layers become static content'). This verb+resource+effect structure makes the purpose unambiguous and distinguishes it from sibling tools like merge, split, or rotate, none of which perform a flatten operation.

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?

The description implies when to use the tool (when a PDF needs to be flattened) but does not explicitly state alternatives or exclusion criteria. For example, it doesn't mention that filling forms is a separate tool or that flattening is irreversible. The usage context is inferred from the tool's unique purpose rather than stated explicitly.

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