Skip to main content
Glama

Comprimir (gzip, deflate, brotli)

zlib-compress
Read-onlyIdempotent

Comprime texto o bytes con gzip (RFC 1952), zlib/deflate (RFC 1950/1951) o Brotli (RFC 7932) y devuelve base64, tamaños y razón, para comparar formatos. Los bytes pueden variar entre versiones de zlib; la descompresión sigue siendo compatible. Cuándo: hay que convertir bytes o texto a esta codificación, o desde ella, con exactitud y sin adivinar. No para: descomprimir datos base64 en gzip, zlib/deflate, deflate sin cabecera o Brotli (zlib-decompress). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Compresses text or bytes with gzip (RFC 1952), zlib/deflate (RFC 1950/1951) or Brotli (RFC 7932) and returns base64 plus sizes and ratio, to compare formats. Output bytes may differ between zlib versions; decompression stays compatible. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
dataYesData to compress (string; required).
levelNoLevel (0-9 for gzip/deflate, 0-11 for brotli) (integer; optional; min 0; max 11).
formatNoFormat (optional; one of: gzip, deflate, deflate-raw, brotli; default "gzip").gzip
input_encodingNoEncoding of data (optional; one of: utf8, base64, hex; default "utf8").utf8

Output Schema

NameRequiredDescriptionDefault
ratioNo
base64No
formatNo
input_bytesNo
output_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / data / examples
      Added value: +[
      +  "hola hola hola hola hola"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Compresses text or bytes with gzip (RFC 1952), zlib/deflate (RFC 1950/1951) or Brotli (RFC 7932) and returns base64 plus sizes and ratio, to compare formats. Output bytes may differ between zlib versions; decompression stays compatible. When: bytes or text have to be converted to or from this encoding exactly, without guessing. Not for: decompressing base64 data in gzip, zlib/deflate, raw deflate or Brotli (zlib-decompress). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world and non-destructive, yet the description still adds real context: resource limits (64 KB JSON input, 1 s per call, 1 MB result) and the caveat that output bytes may differ across zlib versions while decompression remains compatible. Some phrases ("sin red, sin estado guardado") merely restate the annotations, and the "Determinista" claim sits slightly at odds with the version-variance note, keeping this short of a 5.

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?

Well front-loaded: purpose first, then when/when-not, side effects and limits in labelled clauses. The only inefficiency is the duplicated full Spanish and English rendering of the same content, which inflates length without adding information.

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 4-parameter, output-schema-bearing compression tool, everything an agent needs is present: scope, the sibling to avoid, safety profile, resource limits and the version-compatibility caveat. Return values are covered by the output schema, so no explanation of the response shape is required.

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% and both enums (format, input_encoding) are documented with defaults in the schema, so the baseline is 3. The description mentions text/bytes and format names but adds nothing about the `level` parameter or how `input_encoding` should be paired with `data`, so it does not enrich parameter meaning beyond 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?

States a concrete verb (compress), the exact resource (text or bytes) and enumerates the supported codings with their RFCs (gzip RFC 1952, zlib/deflate RFC 1950/1951, Brotli RFC 7932), plus what it returns (base64, sizes, ratio). It also names the complementary sibling zlib-decompress, so an agent can separate the two without inspecting schemas.

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

Usage Guidelines5/5

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

Explicit routing is given in both directions: "Cuándo: hay que convertir bytes o texto a esta codificación... sin adivinar" and "No para: descomprimir datos base64 en gzip, zlib/deflate, deflate sin cabecera o Brotli (zlib-decompress)". The exclusion names the exact alternative tool and the condition that selects it.

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