Skip to main content
Glama

TinyFn

prettify_json

Prettify (format) a JSON string.

Input Schema

NameRequiredDescriptionDefault
indentNoIndentation spaces
sort_keysNoSort keys alphabetically
json_stringYesJSON string to prettify

Output Schema

NameRequiredDescriptionDefault
errorNo
validNo
prettifiedNo
original_lengthNo
prettified_lengthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedOutput schema / $defs / JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"JsonPrettifyResponse"New value: +"app__routers__json_utils__JsonPrettifyResponse"
  2. Changed3 schema fields changed
    • addedOutput schema / $defs / JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__json_utils__JsonPrettifyResponse"New value: +"JsonPrettifyResponse"
  3. Changed3 schema fields changed
    • removedOutput schema / $defs / JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"JsonPrettifyResponse"New value: +"app__routers__json_utils__JsonPrettifyResponse"
  4. Changed3 schema fields changed
    • addedOutput schema / $defs / JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__json_utils__JsonPrettifyResponse"New value: +"JsonPrettifyResponse"
  5. Changed3 schema fields changed
    • removedOutput schema / $defs / JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • addedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"JsonPrettifyResponse"New value: +"app__routers__json_utils__JsonPrettifyResponse"
  6. Changed3 schema fields changed
    • addedOutput schema / $defs / JsonPrettifyResponse
      Added value: +{
      +  "properties": {
      +    "error": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Error"
      +    },
      +    "original_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Original Length"
      +    },
      +    "prettified": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified"
      +    },
      +    "prettified_length": {
      +      "anyOf": [
      +        {
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Prettified Length"
      +    },
      +    "valid": {
      +      "anyOf": [
      +        {
      +          "type": "boolean"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "title": "Valid"
      +    }
      +  },
      +  "title": "JsonPrettifyResponse",
      +  "type": "object"
      +}
    • removedOutput schema / $defs / app__routers__json_utils__JsonPrettifyResponse
      Removed value: -{
      -  "properties": {
      -    "error": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Error"
      -    },
      -    "original_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Original Length"
      -    },
      -    "prettified": {
      -      "anyOf": [
      -        {
      -          "type": "string"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified"
      -    },
      -    "prettified_length": {
      -      "anyOf": [
      -        {
      -          "type": "integer"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Prettified Length"
      -    },
      -    "valid": {
      -      "anyOf": [
      -        {
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "title": "Valid"
      -    }
      -  },
      -  "title": "JsonPrettifyResponse",
      -  "type": "object"
      -}
    • changedOutput schema / x-fastmcp-top-level-schema
      Previous value: -"app__routers__json_utils__JsonPrettifyResponse"New value: +"JsonPrettifyResponse"
  7. First observed

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden and supplies almost nothing. It does not say what happens with invalid JSON (error vs. passthrough), how indent outside 1-8 is handled, or whether the output is a string. For a transformation tool with zero annotation coverage, this is a substantial gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no waste and the core operation stated first. It is arguably over-terse rather than verbose, so the brevity is efficient but leaves gaps elsewhere.

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

Completeness3/5

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

An output schema exists, so return-value explanation is not required, and the three parameters are fully self-documenting. What is missing is the behavioral context — error handling for malformed input and differentiation from the duplicate sibling — which nothing else in the structured data supplies.

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 indent, sort_keys, and json_string are each documented by the schema itself; the baseline of 3 applies. The description adds no meaning beyond the schema — it does not even hint at the formatting options that define the tool's output.

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?

Names a specific verb ('Prettify (format)') and resource ('a JSON string'), so the operation is unambiguous. However, it does not distinguish itself from the near-identical sibling json_prettify (nor from minify_json at the other end of the spectrum), which is a real risk given the dense sibling list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this over json_prettify, json_minify, or validate_json — the obvious alternatives that share the same input domain. No prerequisites or failure conditions are mentioned.

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.