Skip to main content
Glama

pdf_flatten

Merge interactive PDF elements into page content and save a flattened copy, so forms, annotations, and layers render consistently across viewers.

Instructions

Flattens a PDF by merging interactive elements into the page content.

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": {
      "input": "<input>",
      "output": "<output>"
    },
    "name": "pdf_flatten"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesPath to the PDF to flatten.
outputYesPath to save the flattened PDF.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real behavioral insight by explaining that interactive elements are merged into page content — implying forms and annotations become static. However, it omits key consequences: that the operation is effectively irreversible, whether the input file is left untouched, and whether form fields stop being fillable.

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?

A single tightly written sentence with the verb front-loaded and zero filler. Every word contributes to defining the operation.

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?

For a simple two-parameter utility with a fully described schema and no output schema, the description is adequate but thin: it never states that the result is a new file at the output path or that flattening permanently removes interactivity. Those are the details an agent would need to call this correctly in a workflow.

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% with both required parameters ('input' and 'output') fully documented in the schema itself, so the description need not repeat them. It adds no additional meaning about path requirements, overwrite behavior, or extension handling, which is the expected baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('flattens') and resource ('PDF') and clarifies the mechanism as 'merging interactive elements into the page content', so an agent understands the operation rather than guessing at an ambiguous term. It does not differentiate from any sibling, but the surrounding tool family is mostly distinct operations, so the gap is minor.

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?

There is no guidance on when to choose this tool, what prerequisite state the PDF should be in, or what alternatives exist (e.g., leaving annotations editable via pdf_annotate). The agent must infer the use case entirely from the verb.

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