Upload images from the chat
upload_filesOpen a card in the chat where the user picks or drops images from their computer; they go straight to a folder on the user's server, without passing through the conversation (no base64 in tokens), and the paths come back as a message from the user. Use it when the user has images they have not attached, or many of them; for one image already attached to the chat, write_file with file does the same. Say in one sentence that the card is open and wait. JPEG, PNG, GIF, WebP or AVIF, 15 MB each, up to 20 at a time; names are made lower case and safe, and a file with the same name is replaced (the earlier version is kept under /var/lib/askyourstack/backups). Changes must be open on the server, like for write_file; the card is valid for 30 minutes. Afterwards use the paths, for example in a CMS block or a product, with the tools for that site.
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": {
"folder": "<folder>"
},
"name": "upload_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder | Yes | Absolute folder on the server for the images (created if missing), for example /home/shop/public_html/pub/media/wysiwyg/christmas | |
| server | No | Server name or id. Optional when the account has one server. |