Skip to main content
Glama

JSON formatter

hopi_json_formatter
Read-onlyIdempotent

Pretty print, minify or validate JSON. Formatting and minifying only change whitespace; key order, values and structure stay exactly as they were. Returns the output text or a clear parse error. Source: https://hopi.co.uk/json-formatter/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesThe JSON text to process
modeNo'format' to pretty print, 'minify' to strip whitespace, 'validate' to only check validity (default format)format
indentNoNumber of spaces per indent level when formatting (default 2)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
validYes
outputYes
summaryYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "mode",
      +  "output",
      +  "source_url",
      +  "summary",
      +  "valid"
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: the guarantee that 'key order, values and structure stay exactly as they were' during formatting/minifying, and the clarification about returning 'output text or a clear parse error' rather than silently failing. This aligns with and enriches the annotations.

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?

Three compact sentences with the primary function front-loaded in the first sentence. The second sentence adds the preservation guarantee (critical for trust), and the third covers return behavior concisely. The trailing source URL is the only arguably non-operational element, but it sits at the end, out of the way, and provides provenance. No wasted words, 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 simple trio-mode utility, the combination is near-complete: the output schema exists so return values are documented elsewhere, the description still adds the useful error-behavior note, annotations cover the read-only/idempotent profile, and all three parameters are fully documented in the schema. The only marginal gap is the precise output shape of validate mode, but the output schema likely resolves that.

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%, with each parameter already well-documented ('The JSON text to process', the three mode behaviors, and the indent spacing default). The description adds essentially no parameter-level detail beyond the schema, so the baseline of 3 applies. It does reinforce the mode semantics by naming the three operations, but that is redundant with the enum.

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 opens with three specific verbs tied to a clear resource: 'Pretty print, minify or validate JSON.' This precisely defines the tool's scope and differentiates it from sibling JSON tools like hopi_json_to_csv, hopi_json_to_typescript, and hopi_json_yaml_converter, which perform conversions rather than formatting/validation. The three operational modes are also echoed in the enum, making the purpose unambiguous.

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 context is implied through the mode enumeration ('format' to pretty print, 'minify' to strip whitespace, 'validate' to only check validity), which tells an agent when each variant applies. However, the description does not explicitly name any sibling alternatives or state when NOT to use this tool, such as when a conversion (JSON to CSV/YAML/TypeScript) is actually needed. The guidance is adequate but entirely implicit.

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