box_download_file_tool
Download files from Box and retrieve content as a string or base64-encoded data. Supports text files and images, with optional local saving for downloaded files.
Instructions
Download a file from Box and return its content as a string. Supports text files (returns content directly) and images (returns base64-encoded). Other file types will return an error message. Optionally saves the file locally.
Args: file_id (str): The ID of the file to download. save_file (bool, optional): Whether to save the file locally. Defaults to False. save_path (str, optional): Path where to save the file. If not provided but save_file is True, uses a temporary directory. Defaults to None.
return: str: For text files: content as string. For images: base64-encoded string with metadata. For unsupported files: error message. If save_file is True, includes the path where the file was saved.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
file_id | Yes | ||
save_file | No | ||
save_path | No |