Skip to main content
Glama

Lookup Kit

json_format

Read-only

JSON validator and formatter, pretty-print or minify JSON. Check whether text is valid JSON; if it is, return it pretty-printed (or minified) with its top-level type and size; if not, return the error and where it is. Price: $0.002 per call (x402, USDC on Base).

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": "json_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsonYes
indentNo
sort_keysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds real value beyond them: it discloses the success return shape (pretty-printed/minified output plus top-level type and size), the failure shape (error and its location), and a per-call price with payment mechanism.

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 purpose and both outcome branches are front-loaded in the first two clauses, with pricing tacked on at the end. It is dense and mostly waste-free, though the single run-on sentence packs purpose, behavior, and billing together without visual separation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a stateless read-only tool with no output schema, the description covers purpose, success/failure results, and cost adequately. It is incomplete on the input side, however, since sort_keys and indent semantics are left entirely to an undocumented schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 3 parameters, so the description must carry the burden. It only indirectly gestures at 'indent' via 'pretty-print or minify' and never mentions 'sort_keys', its behavior, or the indent default/range, leaving two of three parameters unexplained in both schema and description.

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?

"JSON validator and formatter, pretty-print or minify JSON" gives a specific verb pair and resource, and the detail sentences spell out both modes of operation. It is clearly distinct from siblings like csv_to_json or format_convert, which convert between formats rather than validate/pretty-print JSON text.

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?

The description makes the use case clear: pass text to check validity and optionally get it reformatted, with the choice between pretty-print and minify stated. It does not name exclusions or a sibling alternative (e.g., when to prefer format_convert), so it stops short of full routing guidance.

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