Skip to main content
Glama

indent

Re-indent JSON with a chosen width, or collapse it to one line. Pure CPU, instant.

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

Input Schema

NameRequiredDescriptionDefault
jsonYesJSON text
indentNoSpaces (0 to minify)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Changed3 schema fields changed
    • addedInput schema / properties / indent
      Added value: +{
      +  "description": "Spaces (0 to minify)",
      +  "type": "integer"
      +}
    • addedInput schema / properties / json
      Added value: +{
      +  "description": "JSON text",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "json"
      +]
  4. Added

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the behavioral disclosure burden. It adds useful context that the operation is 'Pure CPU, instant', but it does not describe invalid-input behavior, output format, or whether the original JSON is preserved. For a simple formatting tool this is acceptable but not rich.

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 short sentences with no filler. The formatting modes are front-loaded and the performance note is compact. Every phrase contributes to understanding how to invoke the tool.

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?

The tool is simple: two parameters, full schema description coverage, and no output schema. The description covers the two operating modes and the performance profile, which is enough for an agent to call it correctly. It could be slightly stronger by noting the expected return value or invalid-JSON behavior.

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%, so both parameters are already documented in the input schema. The description reinforces that indent controls width and that width 0 collapses to one line, but adds no syntax or format details beyond what the schema provides. Baseline 3 is appropriate when the schema does the heavy lifting.

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 uses a specific verb and resource: 'Re-indent JSON' and 'collapse it to one line'. It clearly states the two formatting modes, so an agent can understand the tool's purpose without opening the schema. It does not explicitly contrast itself with nearby siblings like json, json_validate, or json_flatten, which keeps it from a 5.

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?

The description implies usage by naming two modes: re-indenting with a chosen width and collapsing to one line. However, it does not say when to choose this tool over JSON-related alternatives such as json_flatten or json_validate, nor does it give exclusions or prerequisite conditions.

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