Add the user's images
upload_imagesBrings the user's own images (PNG, JPEG, or WebP, up to 5 MB each) into the workspace, optionally into a collection, which is made when no collection has that name. Without files it returns a link to the workspace's Images page (the collection's page with collection) for the user to drop the images into; after they say they are done, search_assets finds them. Images already online, such as product photos from a store, go in urls: Kalpana fetches each one (up to 20 a call, 5 MB each) and returns it recorded, with no upload step; a URL's host has to be on the workspace's domain whitelist (cdn.shopify.com is on it by default, and an admin adds others in Workspace Settings), and a URL that fails is listed in failed while the rest are stored, with a link to the settings page when its host is not whitelisted. An agent that has the files (a shell, files on disk) works in three steps: call with files (each one's SHA-256 hash, content type and size) to get one uploadUrl per file; PUT each file's bytes to its uploadUrl with that Content-Type header; then call again with done (each hash and file name) to record them. The recorded images come back with their id, the asset_id of an image input in batch rows. Image data is not accepted inline as base64. To look at an image already uploaded use inspect_image, and to find one search_assets. Needs assets:create.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "upload_images"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| done | No | Files you uploaded, to record them | |
| urls | No | Images for Kalpana to fetch from the web, instead of files and done | |
| files | No | Files you will upload yourself | |
| collection | No | Collection to put the images in, by name |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| link | No | The workspace's Images page for the user | |
| step | Yes | link: give the user the link; uploads: PUT each file, then call with done; done: the images are recorded | |
| failed | No | ||
| images | No | ||
| uploads | No | ||
| collection | No |