Skip to main content
Glama

Razi Media Tools

compress_image

Re-encode a single raster image to webp, jpeg, png or avif, optionally resizing it and/or converting it to grayscale. HEIC/HEIF input is converted to JPEG first, and SVG input is rasterised at 300 DPI, fitted inside 800x800 unless width or height is given. Lossy for webp, jpeg and avif at any quality below 1.0. Raster images only: a PDF or a video is rejected, and neither can be re-encoded anywhere on this server. Output shape depends on size: an input under 5MB is processed in-app and the encoded image bytes are returned, while anything larger is sent to razi.pro's worker and the reply is JSON { url, size, metadata } pointing at a hosted copy instead of bytes. Paid compute; 30 calls per hour per IP. 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 image over the REST API first (POST /api/v1/tools/execute with the file attached).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoTarget width in pixels. Give only one of width/height to scale the other proportionally. Omit both to keep the original dimensions. Enlarging is allowed.
formatNoOutput container/codec. Default webp; an unrecognised value also falls back to webp. Transparency survives in webp, png and avif but not jpeg.
heightNoTarget height in pixels. Give only one of width/height to scale the other proportionally. Omit both to keep the original dimensions.
qualityNoEncoder quality as a fraction from 0.1 to 1.0, scaled to the encoder's 0-100 range. Default 0.9. Higher means larger and closer to the original.
grayscaleNoDrop colour before encoding. Default false.
keepAspectRatioNoOnly has an effect when BOTH width and height are given. Default false, which centre-crops the image to fill the box exactly. Set true to fit the whole image inside the box instead, so the result may be smaller than the box in one dimension.

Schema Changelog

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

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly. It discloses lossy behavior below quality 1.0, HEIC/SVG conversion, the 5MB threshold that changes the return shape (bytes vs JSON), the rate limit of 30 calls/hour/IP, and the rejection of third-party URLs.

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 core purpose is front-loaded in the first sentence, and every subsequent sentence adds a distinct operational constraint: input format handling, quality semantics, size-based output switching, rate limits, and upload workflow. The description is dense but each clause earns its place.

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?

The description compensates well for the missing output schema by spelling out both possible return shapes, plus input restrictions and rate limits. However, it instructs the agent to 'pass `fileUrl`' while the input schema has no such property, leaving the central invocation mechanism unresolved.

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%, so the baseline of 3 applies. The description adds useful nuance (e.g., 'Lossy for webp, jpeg and avif at any quality below 1.0'), but most parameter meaning already comes from the schema.

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 states a specific verb and resource: 'Re-encode a single raster image to webp, jpeg, png or avif, optionally resizing it and/or converting it to grayscale.' This clearly distinguishes compress_image from the sibling generation and QR-code tools, and the scope is unambiguous.

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?

Provides clear context for when to use the tool: 'Raster images only' with PDF/video explicitly rejected, and a mandatory prerequisite of passing a razi.pro-hosted fileUrl obtained via REST. It does not explicitly name alternatives, but the exclusionary guidance is strong enough for an agent to route correctly.

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