fetch_images
Extract and process images from URLs or local file paths, converting them into LLM-compatible formats. Automatically compresses oversized images while preserving quality, handling multiple sources in parallel.
Instructions
Fetch and process images from URLs or local file paths, returning them in a format suitable for LLMs.
This tool accepts a list of image sources which can be either:
1. URLs pointing to web-hosted images (http:// or https://)
2. Local file paths pointing to images stored on the local filesystem (e.g., "C:/images/photo1.jpg")
For a single image, provide a one-element list. The function will process images in parallel
when multiple sources are provided. Images that exceed the size limit (1MB) will be automatically
compressed while maintaining aspect ratio and reasonable quality.
Args:
image_sources: A list of image URLs or local file paths. For a single image, provide a one-element list.
Returns:
A list of Image objects or None values (if processing failed) in the same order as the input sources.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
image_sources | Yes |
Input Schema (JSON Schema)
{
"properties": {
"image_sources": {
"items": {
"type": "string"
},
"title": "Image Sources",
"type": "array"
}
},
"required": [
"image_sources"
],
"title": "fetch_imagesArguments",
"type": "object"
}