Skip to main content
Glama
json-minifiy-formatter-mcp

json-minifiy-formatter-mcp

by masx200

minify_json

Compress a JSON string into a single line by removing all whitespace, with optional key sorting for consistent output.

Instructions

把 JSON 字符串压缩成单行,去掉所有空白字符

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": {
      "raw": "<raw>"
    },
    "name": "minify_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawYes原始 JSON 字符串
sort_keysNo是否对键排序

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it says nothing about side effects, whether key order is changed, or what happens with invalid JSON input. The notable behavior of sorting keys (sort_keys defaults to true, which reorders data) is never surfaced in the description. Only the whitespace-stripping effect is disclosed.

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?

A single short sentence with the core effect front-loaded and zero filler. Nothing could be removed without losing information.

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 two-parameter pure transform with complete schema coverage and no output schema, this is close to complete: the transformation is unambiguous. The remaining gap is the absence of any mention of key-sorting behavior or error handling for malformed input, which matters because sort_keys defaults to true.

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 ('raw' and 'sort_keys') are already documented in the schema. The description adds no meaning beyond that – it never mentions key sorting at all. This is the baseline case where the schema does all the parameter work.

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 states a specific verb and resource ('把 JSON 字符串压缩成单行' – compress a JSON string into a single line) plus the mechanism ('去掉所有空白字符'). An agent knows exactly what the tool produces. It stops short of naming the contrast with the sibling format_json, so sibling differentiation is only implicit in the word '压缩'.

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?

There is no explicit when-to-use or when-not-to-use guidance, and no mention of the sibling format_json as the alternative for pretty printing. Usage is only implied by the stated purpose: whenever an agent needs a compact one-line JSON payload. Nothing tells the agent which tool to pick when it just wants a reformatted document.

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

Deploy Server

Other Tools