Skip to main content
Glama

MiaoToolbox (妙用盒)

JSON / YAML / TOML 互转与校验(妙用盒)

convert_data_format
Read-onlyIdempotent

配置文件语法校验、格式化与 JSON / YAML / TOML 三格式安全互转。内置 YAML 别名展开上限与深度限制,拒绝 TOML 不支持的 null/数组根节点静默丢数据。MCP 上限 ≤8,000 字符且 ≤12,000 字节。

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": {
      "input": "<input>",
      "sourceFormat": "<sourceFormat>",
      "targetFormat": "<targetFormat>"
    },
    "name": "convert_data_format"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYes待转换的 JSON / YAML / TOML 文本(≤8,000 字符)
indentNo缩进空格数(0–4,默认 2)
minifyJsonNo【目标为 json】是否压缩为单行 JSON(默认 false)
sourceFormatYes源格式:json / yaml / toml
targetFormatYes目标格式:json / yaml / toml

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real behavior beyond that: YAML alias-expansion and depth caps, refusal (rather than silent data loss) on TOML null/array root nodes, and the ≤8,000 char / ≤12,000 byte ceiling. It does not say what the response looks like on rejection, which keeps it at 4.

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?

Three dense sentences, front-loaded with the core capability before the safety and limit details. No filler, though the size ceiling partly repeats the schema's input description and the opening 'syntax validation / formatting' clause is not backed by any mode parameter, which is a minor loose end.

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?

With no output schema and five parameters, the description carries real weight, and it does cover limits and failure semantics for a pure transformation tool. It never states what is returned on success (converted text presumably) or that validation/formatting is achieved by converting to the same format, leaving a small gap for an agent using it in those modes.

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 every parameter (input, sourceFormat, targetFormat, indent, minifyJson) is already documented, including enum values and ranges. The description adds essentially nothing parameter-specific; the 8,000-character limit it mentions is already stated in the input field's schema description. Baseline 3 applies.

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 pairs concrete verbs (validate, format, convert) with a specific resource set: JSON / YAML / TOML configuration text. That is far more specific than a generic 'convert' and implicitly separates it from the numeric/time conversion siblings. It stops short of naming a sibling or stating the boundary explicitly, so it lands at 4 rather than 5.

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 only implied: an agent can infer 'use this when you have JSON/YAML/TOML text and need another format or a syntax check.' There is no explicit when-to-use, when-not-to-use, or comparison to siblings such as convert_table_format. The rejection rules (TOML null/array roots) hint at edge cases but are not framed as selection guidance.

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