Skip to main content
Glama

ToolForte

JSON Formatter

format_json
Read-onlyIdempotent

Validate and pretty-print JSON with a real parser. Returns formatted JSON or the exact parse error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonYesThe JSON text to validate and format
indentNoSpaces per indentation level, 0 to 8 (default 2)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validNoWhether the input passed every check
outputNoThe final output of the workflow
resultNoThe result, when it is not an object

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • removedOutput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changed
    • addedInput schema / properties / indent / description
      Added value: +"Spaces per indentation level, 0 to 8 (default 2)"
    • addedInput schema / properties / json / description
      Added value: +"The JSON text to validate and format"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "output": {
      +      "description": "The final output of the workflow",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    },
      +    "valid": {
      +      "description": "Whether the input passed every check",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed3 schema fields changed
    • removedInput schema / properties / indent / description
      Removed value: -"Spaces per indentation level, 0 to 8 (default 2)"
    • removedInput schema / properties / json / description
      Removed value: -"The JSON text to validate and format"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "additionalProperties": {},
      -  "properties": {
      -    "output": {
      -      "description": "The final output of the workflow",
      -      "type": "string"
      -    },
      -    "result": {
      -      "description": "The result, when it is not an object"
      -    },
      -    "valid": {
      -      "description": "Whether the input passed every check",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  4. Changed3 schema fields changed
    • addedInput schema / properties / indent / description
      Added value: +"Spaces per indentation level, 0 to 8 (default 2)"
    • addedInput schema / properties / json / description
      Added value: +"The JSON text to validate and format"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "output": {
      +      "description": "The final output of the workflow",
      +      "type": "string"
      +    },
      +    "result": {
      +      "description": "The result, when it is not an object"
      +    },
      +    "valid": {
      +      "description": "Whether the input passed every check",
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already cover safety (readOnlyHint, destructiveHint=false, idempotentHint) and output schema exists, lowering the bar. The description adds the useful fact that it returns either formatted JSON or the exact parse error, but does not disclose limits like the 200000-mchar max beyond schema.

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, front-loaded with the action and followed by the return behavior. No wasted words.

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?

For a simple two-parameter, read-only tool with full schema and output schema, the description covers purpose and return semantics. Nothing essential is missing.

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%, so the schema fully documents both parameters including indent range and default. The description adds no parameter-level detail beyond what the schema provides, making baseline 3 appropriate.

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?

States a specific verb+resource ('Validate and pretty-print JSON') and the mechanism ('with a real parser'), and it clearly distinguishes itself from siblings like csv_to_json or text_diff. An agent can immediately tell what this tool does.

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 use for validating/formatting JSON but does not say when to use this vs alternatives or any exclusions. Sibling names like csv_to_json hint at the boundary, but no explicit guidance is given.

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