Skip to main content
Glama

Agent Data Tools: Utilities

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 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "json_minify"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe JSON text

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, destructiveHint=false), the description adds real behavioral context: it reports before/after sizes, it 'reads or computes only and changes nothing', and it discloses per-call pricing, free failed calls, and that repeats are not free. The 'each call is charged, so repeats are not free' note usefully reinforces the non-idempotent annotation without contradicting it.

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 core action and purpose are front-loaded in the first sentence, with pricing details trailing afterward. The billing sentence is dense (x402 USDC, card key, first 10 free, failed calls free) but each clause is operationally relevant.

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?

With no output schema, the description correctly covers the return value (sizes before and after) and the side-effect profile. The one gap is error behavior: it does not say what happens when the input is not valid JSON, which matters for a minifier.

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 the single parameter 'text' is already documented as 'The JSON text'. The inline example text={ "a" : 1 } illustrates that the input may itself contain whitespace, but that is marginal added meaning over the schema.

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?

The description states a specific verb and resource: 'Remove all unnecessary whitespace from JSON', plus a secondary effect ('report the size before and after'). It is clearly a minification tool, not a formatter or repairer, though it never names the neighboring json_format or json_repair tools to draw the contrast explicitly.

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?

'Use to shrink payloads or prompts' gives a concrete usage context for selecting this tool. There is no explicit when-not guidance and no named alternative, so an agent must infer the boundary against json_format on its own.

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