format_json
JSON 字符串处理。action 支持:format(美化缩进2格,中文不转义)、minify(压缩为单行去空白)、validate(仅校验合法性,非法时返回错误行号、列号、位置指针和上下文片段)。输入 data 必须是字符串。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| action | No | format |
JSON 字符串处理。action 支持:format(美化缩进2格,中文不转义)、minify(压缩为单行去空白)、validate(仅校验合法性,非法时返回错误行号、列号、位置指针和上下文片段)。输入 data 必须是字符串。
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| action | No | format |
Changes observed during successful MCP inspections. Dates show when Glama detected each change.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the full behavioral disclosure burden. It discloses concrete behavior: format indents 2 spaces and does not escape Chinese, minify removes whitespace to a single line, and validate returns line/column/pointer/context on invalid input. It also states the input data must be a string. This is strong behavioral detail, though it does not mention success return values.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is one dense sentence, yet every part carries information: the input type, the three actions, and their specific output/error characteristics. It is concise but could be slightly better structured by splitting actions into separate sentences or bullets. It is front-loaded with the core purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is low-complexity and has no output schema, so the description must convey return behavior on its own. It explains error output for validate and implies the produce of format and minify through 'beautify' and 'compress', but it does not explicitly state the successful return format for format/minify. Overall it is sufficient for calling the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has no descriptions for its parameters (0% coverage), so the description must compensate fully. It does: it explains that data must be a string, and it lists the valid action values (format/minify/validate) plus their behaviors. This gives the agent everything needed to set both parameters correctly.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool processes JSON strings with specific actions: format, minify, and validate. It names the resource (JSON string) and gives a verb-like action list, easily distinguishing it from the sibling tools (convert_timestamp, convert_unit, generate_qr, generate_uuid), which are all about conversion or generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains what actions the tool supports (format/minify/validate), so an agent can infer when to use it, but it does not explicitly state when to choose this tool over alternatives. The alternatives are so semantically distinct that no conflict is likely, but the guidance is implicit rather than direct.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.
Each tool maps to a distinct operation: timestamp conversion, unit conversion, JSON processing, QR generation, and UUID generation. There is no functional overlap or realistic chance of selecting the wrong tool.
All names follow a clear verb_object snake_case pattern: convert_timestamp, convert_unit, format_json, generate_qr, generate_uuid. The verb prefixes consistently reflect the action category.
Five tools is a well-scoped size for a focused developer utility server; each tool provides a distinct, reusable capability and none feels redundant or extraneous.
Each utility is functionally self-contained: timestamp conversion works in both directions, JSON supports format/minify/validate, QR supports SVG/PNG, and UUID supports v4/v5. The set is a loose collection rather than a tightly defined domain, so common utilities like hashing or base64 are absent, but this is a minor gap rather than a blocking one.