read_local_image
Read a local image file and encode it to base64, enabling use in API requests or data URIs. Supports both base64 and data URI formats for flexible integration.
Instructions
Read a local image file and convert it to base64. WARNING: Returns the full base64 string which can be very large and slow to display. Use prepare_image instead for better performance.
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>"
},
"name": "read_local_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the image file | |
| return_format | No | Format to return: base64 string or data URI | base64 |