Skip to main content
Glama

JSON Format

text_json_format
Read-only

Format and pretty-print a JSON string with configurable indentation. Use when making minified or compact JSON readable for debugging or documentation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesRaw JSON string to format
indentNoNumber of spaces for indentation (0-8)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The readOnlyHint annotation covers safety. The description adds meaningful behavioral context (configurable indentation, purpose of readability) beyond annotations. It does not address invalid JSON handling or return format, but the annotation lowers the burden for this simple tool.

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 action, and contains zero filler. It efficiently communicates purpose and usage.

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 tool, this description is largely complete: schema covers params, annotations cover safety, and description covers purpose. There is no output schema, but the output (formatted string) is implied. Minor gap: no discussion of error handling or large inputs, but not critical.

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 coverage is 100% with descriptions for both parameters (json, indent). The description's mention of 'configurable indentation' aligns with the indent param but adds no extra semantics beyond what the schema already provides. Baseline 3 applies.

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/pretty-print), resource (JSON string), and configurable indentation. It distinguishes itself from sibling tools like text_json_validate (validation) and text_json_to_yaml (conversion).

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?

It provides explicit usage context: 'Use when making minified or compact JSON readable for debugging or documentation.' However, it does not explicitly name alternatives or when-not-to-use cases, so it stops short of a 5.

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