Skip to main content
Glama
pdf4me
by pdf4me

linearize_pdf

Linearize a PDF for faster web loading and progressive display. Provide the local file path and choose an optimization profile like web or Compress.

Instructions

Linearize a PDF file with the PDF4me API for faster web loading and progressive display. Provide the local file path to the PDF. Choose optimize_profile: web, Max, Print, Default, WebMax, PrintMax, PrintGray, Compress, or CompressMax. Optionally specify an output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the PDF file to linearize.
output_dirNo
optimize_profileNoOptimization preset (see PDF4me LinearizePdf docs).web
output_file_nameNo
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits, but it only explains the general purpose and parameter usage. It does not state whether the original file is modified, what output is produced, where the result is saved, or if network/API authorization is required. This leaves significant ambiguity for a file transformation tool.

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 four short, focused sentences: purpose, required input, optimize_profile choices, and optional output parameters. Every sentence contributes distinct information with no redundancy or filler.

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 tool with 4 parameters and no output schema, the description gives a basic usage template but omits critical context: how to retrieve the resulting PDF, what happens if output_dir is omitted, what the different optimize_profile presets actually do (though referenced to docs), and any error conditions. It is minimally adequate but has clear gaps.

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 50% (file_path and optimize_profile are described, output_dir and output_file_name are not). The description repeats the optimize_profile values already in the enum and merely mentions output dir/name as optional without explaining default behavior or naming rules. It adds a little value but does not compensate fully for the uncovered parameters.

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 uses a specific verb 'Linearize' with a clear resource 'PDF file' and states the purpose 'for faster web loading and progressive display'. It distinguishes from sibling tools by calling out the web-loading benefit, which no other PDF tool explicitly offers.

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

Usage Guidelines4/5

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

The description clearly implies when to use the tool (for faster web loading and progressive display) and provides direct invocation steps. However, it does not explicitly name alternatives (e.g., compress_pdf) or state when not to use it, so it falls short of a 5.

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