convert_json
Convert JSON to CSV, TSV, YAML, or TypeScript type definitions. Works with arrays of objects for CSV/TSV; any structure for YAML and TypeScript.
Instructions
Convert JSON to another format: CSV, TSV, YAML, or TypeScript type definitions. CSV/TSV requires a top-level array of objects. YAML and TypeScript work on any structure.
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": {
"json": "<json>",
"format": "<format>"
},
"name": "convert_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| json | Yes | The JSON string to convert. | |
| format | Yes | Target format: "csv", "tsv", "yaml", or "typescript" (TypeScript interfaces). | |
| rootName | No | Root type name for TypeScript conversion (default: "Root"). Ignored for other formats. | Root |