Skip to main content
Glama

json-formatter

Read-onlyIdempotent

Format JSON: pretty-print with indentation or minify to a single line. Validates the input — invalid JSON returns a clear error pointing at the problem.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesInput JSON text. Must parse as valid JSON.
modeNopretty: indent with spaces (default). minify: strip all whitespace.
indentNoSpaces of indent for pretty mode. Default 2.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesMode used.
outputYesFormatted JSON string.
bytes_inYesLength of the input string.
bytes_outYesLength of the output string.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

The description goes beyond the annotations by disclosing that the tool validates input and returns a clear error on invalid JSON, which is not stated in the schema or annotations. It also explains the two output behaviors (pretty-print with indentation vs. minify). Since annotations already declare readOnlyHint, idempotentHint, and destructiveHint, the added behavioral context is valuable and non-contradictory.

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 sentences, front-loaded with the primary action and mode options, and includes a brief mention of the error handling. Every word contributes necessary information with no filler or redundancy. It is concise yet complete for a tool of this simplicity.

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

Completeness5/5

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

Given the tool's low complexity (3 params, all documented in schema), the presence of an output schema, and robust annotations (readOnly, idempotent, non-destructive), the description covers all necessary behavioral aspects: formatting modes, validation, and error reporting. It does not need to explain return values because the output schema exists, and the description adds appropriate context for the tool's usage.

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?

The schema covers all three parameters with descriptions (100% coverage), so the baseline is 3. The description adds modest context by explaining the 'pretty' and 'minify' modes, which corresponds to the 'mode' parameter, and implies validation for the 'json' parameter. However, it does not add significant detail beyond the schema's own parameter descriptions, such as defaults or constraints.

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 clearly states the tool's function with a specific verb ('Format JSON') and resource ('JSON'), and distinguishes between two modes (pretty-print or minify). It also mentions validation, setting it apart from generic converters or calculators in the sibling list. The resource and action are unambiguous and fully aligned with the tool name.

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 implies when to use the tool (when needing to format or validate JSON) and clearly distinguishes the two modes. It does not explicitly mention when not to use it or list alternatives, but the sibling tools are unrelated to JSON formatting, so no alternative is needed. The contexts of 'pretty-print' and 'minify' provide clear usage scenarios.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Most tools have distinct purposes. However, 'hex-to-rgb' is redundant with 'color-converter', which already handles hex-to-RGB conversion, causing potential confusion.

Naming Consistency4/5

Names follow a consistent lowercase-with-hyphens style, but vary in pattern (e.g., 'angle-converter', 'average-calculator', 'dedup-lines'). One tool ('internal-do-not-call') deviates from the descriptive norm.

Tool Count2/5

With 46 tools, the server is heavily populated. Many converters could be merged into a generic unit converter, and there is redundancy, making the surface unnecessarily large for a single server.

Completeness4/5

The server covers a broad range of utility domains: converters, text processing, math, cryptography, etc. Minor redundancies exist (e.g., hex-to-rgb vs color-converter), but the set is otherwise comprehensive.

Resources