Skip to main content
Glama

Format a local JSON file

abox_json_format

Pretty-print or minify UTF-8 JSON files while preserving numeric spellings, large integers, duplicate keys, escaped string tokens, and key order. Optionally sort keys and verify the written output.

Instructions

Pretty-print or minify UTF-8 JSON using the existing abox.tools parser. Preserves numeric spellings, large integers, duplicate keys, escaped string tokens and object key order. Optional natural key sorting. Writes a new JSON file with a final newline and verifies tokens and structure. Input up to 8 MiB and 256 nesting levels; output up to 32 MiB. File contents are not returned.

Input Schema

NameRequiredDescriptionDefault
indentNo2
minifyNo
sort_keysNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.2/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it writes a new file, appends a final newline, verifies tokens and structure post-write, and states hard limits (8 MiB input, 256 nesting levels, 32 MiB output). It also discloses preservation guarantees (numeric spellings, large integers, duplicate keys, key order) and that file contents are not returned — none of which the annotations convey.

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?

Dense but front-loaded, with the core action in the first clause and limits/behavior following. Minor filler in the implementation reference ('using the existing abox.tools parser'), but nearly every sentence carries useful information.

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?

With no output schema, the description supplies exactly what an agent needs: that output goes to a new file rather than the response, the size/nesting limits, and post-write verification. Nothing material is missing for correct invocation.

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 only 40%, so the description must compensate. It clarifies sort_keys as 'natural key sorting' and explains that minify is an alternative mode, but indent's allowed values (2/4/tab) are left entirely to the enum and the interaction between minify and indent is ambiguous. Partial compensation.

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 pair (pretty-print/minify) and resource (UTF-8 JSON file), and the format-only nature distinguishes it from conversion siblings like abox_yaml_json and abox_xml_json. An agent can tell what it does without opening the schema.

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?

Usage is implied by the operation (format an existing JSON file), but there is no explicit when-to-use/when-not guidance and no mention of alternatives such as the conversion tools. The input_path/output_path constraints in the schema implicitly scope it to local files only.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.