convert_file
Convert local images or videos to another format and save the result to disk, either beside the source file or in a chosen output directory.
Instructions
Convert a local image or video to another format, and save the output to disk.
Args:
file_path: The file to convert.
output_format: Target format. Images: jpeg, png, webp, avif, heic,
jxl. Videos: mp4h264, mp4h265, webm, mkv, mov.
output_dir: Where to write the converted file. Defaults to alongside the input.
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": {
"file_path": "<file_path>",
"output_format": "<output_format>"
},
"name": "convert_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| output_dir | No | ||
| output_format | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||