- Added `image_read` tool for reading and analyzing images using vision-capable models, with a detailed input schema for image path, prompt, max size, and provider. - Implemented `ReadImage` function to handle image processing and integration with vision models, returning descriptive text. - Created comprehensive tests for image resizing, data URI handling, and various input scenarios to ensure robust functionality. - Updated documentation to include usage examples and parameter descriptions for the new image tools.
26 lines
969 B
JSON
26 lines
969 B
JSON
{
|
|
"name": "image_read",
|
|
"description": "Read and analyze an image using a vision-capable model.",
|
|
"process": "tools.image_read",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"image_path": {
|
|
"type": "string",
|
|
"description": "Path or URI of the image to analyze. Accepts: local file path, URL (http/https), workspace://, attach://, yao://, or data URI."
|
|
},
|
|
"prompt": {
|
|
"type": "string",
|
|
"description": "What to analyze about the image (default: describe in detail)",
|
|
"default": "Please describe this image in detail."
|
|
},
|
|
"max_size": {
|
|
"type": "integer",
|
|
"description": "Max dimension in pixels for the longest edge. Image is resized (preserving aspect ratio) before sending to the vision model. Default 1080.",
|
|
"default": 1080
|
|
}
|
|
},
|
|
"required": ["image_path"]
|
|
},
|
|
"x-process-args": ["$args.image_path", "$args.prompt", "$args.max_size"]
|
|
}
|