Skip to main content
Glama

Razi Document Tools

compress_pdf

Shrink a PDF's byte size while keeping it a PDF, for email limits or slow connections. Returns the compressed PDF; over MCP it is never inlined, arriving as a stored URL that stays retrievable for about 24 hours. Ghostscript on razi.pro's worker downsamples embedded images at a fixed 'ebook' preset — lossy, with no quality knob. Compression is not guaranteed: if the worker is unavailable the fallback only rewrites the file with object streams, which typically saves almost nothing, and when nothing can be saved the original bytes are returned unchanged. PDFs only: an image or a video is rejected, and neither can be re-encoded anywhere on this server. Paid compute; 20 calls per hour per IP; a large file can take minutes. There is no upload channel over MCP: pass fileUrl, a URL in razi.pro's own storage; third-party URLs are rejected. Obtain one by uploading the PDF over the REST API first (POST /api/v1/tools/execute with the file attached).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and over-delivers: output is never inlined but arrives as a stored URL with ~24h retention, compression is lossy at a fixed 'ebook' preset with no quality knob, compression is not guaranteed (fallback saves almost nothing, originals returned unchanged), images/videos are rejected, and there are rate limits, paid compute, and latency warnings. This is exemplary failure-mode and side-effect disclosure.

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 long, but every sentence earns its place — algorithm, fallback behavior, retention window, rate limits, input constraints, and workflow are all non-redundant. The core purpose is front-loaded and the information is densely packed; only minor tightening would be possible without losing substance.

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

Completeness5/5

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

For a tool with no annotations and no output schema, the description covers input acquisition, output delivery format, quality profile, failure modes, rate limits, and latency. An agent has everything needed to call it correctly and set user expectations; nothing material is missing.

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 exposes zero parameters (baseline 4), and the description goes well beyond it by documenting `fileUrl`: it must live in razi.pro's storage, third-party URLs are rejected, and it is obtained via the REST API. The one flaw is that this parameter is absent from the input schema entirely, so the prose and the formal contract don't align — an agent could be confused about whether fileUrl is a legal argument at the MCP layer.

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 opening sentence uses a specific verb + resource: 'Shrink a PDF's byte size while keeping it a PDF', with explicit use-case context ('for email limits or slow connections'). This is unmistakably distinct from the sibling tools (text extraction, merging, parsing, splitting), so an agent can tell them apart without opening any schema.

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?

Clear context is given for when to use the tool (email limits, slow connections) and hard constraints are spelled out: PDFs only, third-party URLs rejected, and the required prerequisite workflow (upload via REST API first). It stops short of explicitly routing to alternatives or stating when-not-to-use, but the stated constraints and workflow give actionable guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources