Skip to main content
Glama

json_format

Parses JSON text, reports the exact syntax error position if invalid, and returns it pretty-printed or minified with key count and depth. Optionally sorts keys. 0.001 USDC per call via x402.

Input Schema

NameRequiredDescriptionDefault
modeNopretty or minifypretty
textYesInput text (max 20,000 characters)
sortKeysNo
paymentProofNoPayment proof: USDC tx hash on Polygon or Base (0x...) or Solana tx signature. Omit on the first call to receive the 402 payment instructions, pay, then call again with the proof.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses syntax error reporting with exact position, pretty/minified output, key count, depth, optional sorting, and per-call pricing via x402. It is missing some edge-case details such as duplicate-key handling or output field structure, but the core behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two tight sentences with no wasted words. Core behavior is front-loaded, followed by optional sorting and pricing. Every sentence earns its place.

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 no-annotation, no-output-schema utility, the description covers input processing, error behavior, output format, optional sorting, and cost. The payment flow is largely delegated to the schema, which is appropriate, though exact response field names could be clearer.

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 75%, so the schema already documents most parameters. The description adds meaning beyond the schema for sortKeys by saying keys are optionally sorted, and clarifies pretty versus minified output. Payment cost context also supports the paymentProof parameter even though the schema explains the flow.

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?

The description states specific verbs and resource: parses JSON text, reports syntax errors, and returns pretty-printed or minified output. It also distinguishes the tool's behavior with key count, depth, and optional key sorting. An agent can immediately tell this is a JSON formatting/validation utility distinct from siblings like csv_to_json or base64.

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 purpose: format or validate JSON text. However, the description does not explicitly say when to use this versus alternatives such as csv_to_json for conversion. It provides enough context for obvious cases but no exclusions or sibling routing.

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.