Skip to main content
Glama
pdf4me
by pdf4me

compress_pdf

Compress PDFs to reduce file size using PDF4me API. Choose from Web, Print, or Screen optimization profiles to get smaller files for faster sharing.

Instructions

Compress a PDF file using the PDF4me API to reduce file size. Provide the local file path to the PDF. Choose an optimization profile: Web (fast download), Print (high-quality), or Screen (screen viewing). Optionally specify an output directory and output file name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
output_dirNo
optimize_profileNoWeb
output_file_nameNo
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions using the PDF4me API and optimization profiles, but it does not clarify whether the original file is overwritten or a new file is created, whether network access is required, or what the output behavior is. This leaves significant ambiguity for an agent.

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 two sentences long, front-loaded with the primary purpose and followed by concise usage instructions. Every sentence adds value with no redundant or filler content.

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?

The description covers the core purpose and parameters but leaves out important context: no output schema is provided, yet the description does not mention what the tool returns (e.g., success message, output file path). It also omits details about error handling, default output behavior, and the dependency on an external API. While simple, the missing behavioral specifics make it incomplete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has no property descriptions (0% coverage), so the description must compensate. It explains file_path as the local PDF path, optimize_profile with its three options and their meanings, and output_dir/output_file_name as optional. This adds meaningful context beyond the raw schema, though it does not state default values.

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 ('Compress a PDF file') and the resource ('PDF'), distinguishing it from sibling tools like compress_image. The mention of optimization profiles further specifies the tool's unique function.

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 provides clear instructions on how to use the tool: provide a local file path, choose an optimization profile, and optionally specify output details. It implies when to use (when reducing PDF file size is needed) but does not explicitly exclude alternatives or mention when not to use it.

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