Skip to main content
Glama

pdf_flatten

Idempotent

Embed form field values into PDF page content and remove interactivity to create a flat, non-interactive document.

Instructions

Flatten a PDF's form fields, baking their current values into the page content and removing interactivity. Form-less PDFs are copied unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to the source PDF file
outputPathYesAbsolute path for the flattened output PDF
Behavior4/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, so the description builds on this by detailing that the tool bakes current values, removes interactivity, and copies form-less PDFs unchanged. This adds concrete behavioral context without contradicting annotations. However, it does not disclose potential permissions or error handling, preventing a top score.

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: two sentences precisely covering the core operation and an edge case. Every sentence adds value with no redundancy, making it ideal for quick comprehension.

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

Completeness4/5

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

Given the low complexity (2 required params, no output schema, no nested objects), the description sufficiently covers the main effect and a key edge case. It does not describe return values or error conditions, but for this simple tool, the provided information is largely adequate. The presence of many siblings suggests a need for more differentiation, but the purpose clarity already helps.

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 filePath and outputPath having clear descriptions in the schema. The tool description adds no additional parameter-level meaning beyond the schema, so a baseline score of 3 is appropriate as per guidelines.

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 explicitly states 'Flatten a PDF's form fields, baking their current values into the page content and removing interactivity.' It uses a specific verb 'flatten' and resource 'PDF's form fields', clearly distinguishing from sibling tools that handle forms differently (e.g., pdf_fill_form fills but may keep interactivity). The added note about form-less PDFs being copied unchanged further clarifies its purpose.

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 explains the tool's effect but does not provide explicit guidance on when to use it versus alternatives like pdf_fill_form or pdf_get_form_fields. Given the large set of sibling tools, this omission leaves the agent to infer the appropriate context, resulting in a baseline score.

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/AryanBV/pdf-toolkit-mcp'

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