Skip to main content
Glama

Minify JSON: remove whitespace from JSON to make it compact

json_minify
Read-only

Remove all unnecessary whitespace from JSON and report the size before and after. Use to shrink payloads or prompts. Example: text={ "a" : 1 }. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe JSON text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly/destructive=false, but the description adds meaningful context they don't cover: the billing model ($0.01/call, first 25 free, failed calls free) and the explicit warning that repeats are not free. That cost/idempotency nuance is genuinely useful and consistent with idempotentHint=false, though nothing is said about how malformed JSON is handled.

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 the core action and example, then the pricing detail last. The pricing/payment sentence is dense with clauses but each carries information an agent would otherwise have to guess at.

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?

For a one-parameter, annotation-backed transform tool this covers the essentials: what it does, one use case, a format example, the size-delta output, and the cost model. The only real omission is error behavior on invalid JSON input, which the agent must infer.

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?

Schema coverage is 100% for the single 'text' parameter, so baseline is 3; the inline example text={ "a" : 1 } adds concrete format guidance beyond the terse schema field description, pushing it up one.

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?

States a specific verb and resource: 'Remove all unnecessary whitespace from JSON', plus the side output ('report the size before and after'). It is distinguishable from siblings like json_format or json_validate by the whitespace-removal framing, though it never names those siblings to sharpen the contrast.

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

Usage Guidelines3/5

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

'Use to shrink payloads or prompts' gives one concrete context, but there is no when-not-to-use guidance and no mention of the near neighbors (json_format, json_repair, pack_json_toolbox) an agent would plausibly confuse this with.

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.