Format Json
format_jsonJSON 字符串处理。action 支持:format(美化缩进2格,中文不转义)、minify(压缩为单行去空白)、validate(仅校验合法性,非法时返回错误行号、列号、位置指针和上下文片段)。输入 data 必须是字符串。
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": {
"data": "<data>"
},
"name": "format_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON 格式的字符串 | |
| action | No | "format"(默认,美化缩进2格)、"minify"(压缩)、 "validate"(校验合法性) | format |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||