data_convert
Convert files between JSON, YAML, and TOML formats. Specify input file and target format to get converted output or save to a file.
Instructions
Convert file format.
Use when you need to transform a file from one format (JSON, YAML, TOML) to another.
Output contract: Returns {"success": bool, "result": str, ...} or writes to file. Side effects: Writes to output_file if provided. Failure modes: FileNotFoundError if input missing. ToolError if formats same or conversion fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to source file | |
| output_file | No | Optional output file path (if not provided, returns converted content) | |
| output_format | Yes | Target format to convert to |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| result | No | ||
| message | No | ||
| success | Yes | ||
| input_file | No | ||
| output_file | No | ||
| input_format | No | ||
| output_format | No |