Skip to main content
Glama

Agent Data Tools: Utilities

JSON toolbox: validate, format, minify, schema and YAML

pack_json_toolbox
Read-only

Everything about one JSON document in a single call: valid or not with the error's line and column, pretty-printed (optionally with sorted keys), minified with the bytes saved, an inferred JSON Schema, structure statistics (depth, objects, arrays, keys, value types) and the same data as YAML. Up to 200 KB. Cheaper than the separate JSON tools. Use to inspect API responses, clean model output or document a payload. Example: json={"name":"agent","tools":["weather","search"],"active":true,"limits":{"daily":100}}. 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": {
      "json": "<json>"
    },
    "name": "pack_json_toolbox"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYesThe JSON text (up to 200 KB)
sortKeysNotrue to sort object keys in the formatted output

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, destructiveHint=false, openWorldHint=false), yet the description still adds genuinely new behavioral facts: the $0.01/call x402 or card-key billing, the 10-free-call allowance, that failed calls are free, and that repeated calls are charged. The 'reads or computes only and changes nothing' sentence duplicates readOnlyHint rather than extending it, and no latency/response-shape detail is given, keeping this off 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?

Capability list, size limit, cost comparison, use cases, example and pricing are all front-loaded and each sentence carries information. It runs long, and the pricing tail plus the 'changes nothing' restatement of readOnlyHint dilute the otherwise dense opening.

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?

There is no output schema, so the description must enumerate returns, and it does: validity with error line/column, formatted text, minified size savings, inferred schema, depth/type statistics and YAML. Combined with the size limit and billing model, an agent has everything needed to call this correctly.

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% for both parameters, so the schema already documents `json` and `sortKeys`. The description adds only a worked example payload and restates the 200 KB cap and optional key sorting, which yields baseline value but no syntax, encoding or escaping guidance 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?

Opens with a specific verb+resource+scope: 'Everything about one JSON document in a single call', then enumerates the exact operations (validation with line/column, pretty-print with optional key sorting, minify with bytes saved, inferred schema, structure stats, YAML). An agent can immediately distinguish this from single-purpose siblings like json_format, json_minify or json_schema.

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?

Gives concrete when-to-use scenarios ('inspect API responses, clean model output or document a payload') and explicitly routes against the alternatives with a cost argument ('Cheaper than the separate JSON tools'). The 200 KB ceiling is stated as a boundary condition for choosing this tool.

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