Skip to main content
Glama

pretty_json

Format JSON strings or local files with custom indentation to improve readability, without contacting external services.

Instructions

Pretty-print JSON with indentation. Local files/strings only. Does not fetch URLs or contact external services.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoRaw JSON/JSONC string (alternative to filePath).
indentNo
filePathNoLocal JSON/JSONC file path.
outputPathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry the transparency burden. It adds a meaningful boundary by stating it never contacts external services and only handles local input. But it does not disclose outputPath side effects, return behavior, or error handling.

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?

Two short sentences with no filler. The core operation is front-loaded, and the local-only/no-network caveat immediately follows. Every sentence earns its place.

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

Completeness2/5

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

There is no output schema or annotations, and the description does not say what the tool returns, whether it writes to outputPath, or how invalid JSON is handled. For a tool with four parameters, this leaves too much to inference.

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 only 50%, and the description does not compensate. It does not explain the meaning of indent units/defaults or outputPath behavior, which are left undocumented in both the schema and description.

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?

The description clearly states the operation: 'Pretty-print JSON with indentation.' This distinguishes it from validation, extraction, and minification tools, though it does not explicitly contrast with siblings like minify_json.

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?

It gives useful context: local files/strings only, and it does not fetch URLs or contact external services. However, it does not name alternative tools such as minify_json or explain when text vs filePath should be preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.