JSON / YAML / TOML 互转与校验(妙用盒)
convert_data_format配置文件语法校验、格式化与 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
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | 待转换的 JSON / YAML / TOML 文本(≤8,000 字符) | |
| indent | No | 缩进空格数(0–4,默认 2) | |
| minifyJson | No | 【目标为 json】是否压缩为单行 JSON(默认 false) | |
| sourceFormat | Yes | 源格式:json / yaml / toml | |
| targetFormat | Yes | 目标格式:json / yaml / toml |