Skip to main content
Glama

x402 Toolbox

Parse, pretty-print, minify or canonicalize JSON (sorted keys); locate syntax errors

json_format
Read-onlyIdempotent

Parse, pretty-print, minify or canonicalize JSON (sorted keys); locate syntax errors. Parses JSON and returns it pretty-printed (2/4 spaces or tabs), minified, or canonical with sorted keys, plus size, node count and depth. On invalid JSON, reports the error position with line and column. Price: $0.003 USDC per call via x402 (eip155:8453).

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text
modeNopretty
indentNo
sortKeysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered; the description adds real value beyond them by disclosing the x402 price ($0.003 USDC, eip155:8453) and the error behavior (line/column on invalid input). It does not state size limits on input (512KB max lives only in the schema).

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?

Three tight sentences, front-loaded with the modes and output shape, then error handling, then pricing. No filler; the only redundancy is restating the title verbatim in the first sentence.

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 carries the return-value burden and does so (pretty/minified/canonical text plus size, node count, depth, and error line/column). Missing only the input size limit and a couple of indent semantics, which are minor for a stateless utility.

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 only 25%, so the description must compensate; it does explain the three modes and their outputs, and 'canonical with sorted keys' clarifies sortKeys. But it mentions tabs for indent while the enum only allows 0/2/4/8, leaving the 0 and 8 values and the defaults undocumented.

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 set (parse, pretty-print, minify, canonicalize) against a specific resource (JSON), and names the error-location capability. It is clearly distinguishable from json_validate or json_query, though it does not name those siblings explicitly.

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?

Usage is implied by the format list and the 'locate syntax errors' clause, so an agent can infer when it applies. However, there is no explicit when-to-use/when-not guidance and no routing to the obvious alternatives json_validate, json_diff or json_query.

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.