Skip to main content
Glama

Minificar JSON

json-minify
Read-onlyIdempotent

Minifica JSON eliminando espacios; informa tamaños antes y después. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: formatear JSON con sangría de 2/4 espacios o tabulador, con opción de ordenar claves (json-pretty). 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: Parses JSON text and serializes it without whitespace; reports byte sizes before and after. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: parsing JSON text and re-serializes it with 2/4-space or tab indentation, optionally sorting object keys (json-pretty). 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.

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text (string; required).

Output Schema

NameRequiredDescriptionDefault
jsonNoany JSON value
bytes_afterNo
bytes_beforeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / json / examples
      Added value: +[
      +  "{ \"a\" : [ 1, 2 ] }"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the description's 'no side effects / deterministic' statements mostly restate structured data. The genuinely additive content is the limit block, but it conflicts with the schema: the description caps JSON input at 64 KB while the schema sets maxLength to 1048576 (1 MB), leaving the real ceiling ambiguous.

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?

Front-loaded with purpose, then clearly labeled When / Not for / Side effects / Deterministic / Limits sections that scan quickly. The only waste is full duplication of the same content in Spanish and English, which roughly doubles length without adding information.

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?

Output schema exists, so return values need no explanation, and the description still covers exclusions, determinism and performance limits — ample for a one-parameter pure function. Completeness is docked only because the stated 64 KB input cap disagrees with the schema's 1 MB maxLength, leaving an agent uncertain which limit is enforced.

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% with a single required parameter already documented ('JSON text (string; required)') and an example. The description adds no syntax, encoding, or validation semantics beyond that, so the baseline 3 applies; the size-limit remark is the only parameter-adjacent detail and it contradicts 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 precise verb+resource: parses JSON text and re-serializes it without whitespace, plus the extra output of before/after byte sizes. It explicitly names the sibling it is not (json-pretty with 2/4-space or tab indentation and optional key sorting), so an agent can discriminate between the two without opening either 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?

Has explicit 'When:' and 'Not for:' clauses, with the correct alternative tool named in parentheses. However the 'When' clause lists formats the tool cannot actually consume (CSV, YAML, XML, arrays) when the single parameter is strictly JSON text, which could route an agent to pass non-JSON input.

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