Image Editing Toolset

Generated byAI

This toolset provides tools for reading and creating image files within the current directory.

read_image_file

Reads the content of a specified image file in the current directory and returns it as a base64 encoded data URL string.

Parameters

Parameter Type Required Description
file_path String Yes The relative path to the image file to read.

Notes

  • Supported image formats are PNG and JPEG.
  • The tool ensures the file is within the current directory and is a valid image file.

write_image_file

Writes an image file from base64 encoded image data at the specified path. Ensures the file is created within the current directory and does not overwrite existing files unless requested.

Parameters

Parameter Type Required Description
file_path String Yes The relative path where the image file will be created.
image_data String Yes The base64 encoded image data in the format of a data URL (data:<content_type>;base64,<data>). Supported content types are PNG and JPEG.
overwrite Boolean No Set to true to overwrite existing file; default is false.

Notes

  • The tool ensures the file is created within the current directory and does not overwrite existing files.
  • Supported image formats are PNG and JPEG.