Skip to main content
Glama

compress_pdf

Read a local PDF, run OCR, and compress it into dense packed images to reduce file size for efficient processing.

Instructions

Read a local PDF, run Mistral OCR, recompose it into dense packed PNG images, and create a retrievable compression job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdf_pathYes
chars_per_imageNo
inline_imagesNo
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It outlines the pipeline steps but omits critical details: whether the operation is destructive, if it requires network access, what permissions are needed, approximate time, or error conditions. For a multi-step tool, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single 18-word sentence that efficiently lists the sequential steps. It is front-loaded with the main action (read local PDF). However, it could be structured with bullet points or separate clauses to improve readability, though it remains reasonably concise.

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?

Given the tool's complexity (3 parameters, no output schema, no annotations), the description is incomplete. It does not explain return values (e.g., job ID), how to retrieve results (via siblings), or the role of optional parameters. A comprehensive description should at least indicate that a job object is created and that its manifest can be fetched via get_job_manifest.

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

Parameters1/5

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

The input schema has three properties (pdf_path, chars_per_image, inline_images) with zero description coverage in the schema. The description does not mention any parameters, so it adds no meaning beyond the schema. With 0% schema coverage, the description should at least explain the effect of each parameter, but it fails to do so.

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 clearly states the tool reads a local PDF, runs Mistral OCR, recomposes into PNG images, and creates a compression job. This distinguishes it from its siblings (get_job_manifest, get_packed_images) which are retrieval tools. However, it could better emphasize that the primary output is a job object rather than a compressed file.

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?

No guidance is provided on when to use this tool versus alternatives. The description does not mention prerequisites (e.g., local file access, Mistral OCR availability) or scenarios where it should be avoided. There is no mention of the sibling tools or when retrieval should be used instead.

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/ChrBoebel/optical-context-mcp'

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