download
Download files and folders
Gives one link that downloads files and folders of a project the user can open, as Download in awen does: a ZIP of up to 50 files, counting every file inside the folders, which keep their paths (one file alone downloads as itself). Pass each item's entry_id from list_folder. convert_to saves every image that converts as PNG or JPEG and keeps every other file as stored. Files still being made inside a folder are left out and counted in skipped. The link is download_url, valid until expires_at (5 minutes): it opens these files without signing in, so give it only to the user. Call again for a fresh link.
- Permission:
awen:read - Also an API operation:
POST /api/v1/download
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
project_id | string | Yes | The project's project_id. |
items | array of string | Yes | The entry_id of each file and folder to download, from list_folder. |
convert_to | "png" | "jpeg" | No | Saves the images as PNG or JPEG; omit for the originals. |
Call
A host sends a tools/call request to the MCP endpoint, with the arguments it needs.
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "download", "arguments": { "project_id": "<string>", "items": "<array of string>" } }}Arguments schema
{ "type": "object", "properties": { "project_id": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$", "description": "The project's project_id." }, "items": { "minItems": 1, "maxItems": 25, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "description": "The entry_id of each file and folder to download, from list_folder." }, "convert_to": { "description": "Saves the images as PNG or JPEG; omit for the originals.", "type": "string", "enum": [ "png", "jpeg" ] } }, "required": [ "project_id", "items" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "project_id": { "type": "string" }, "download_url": { "type": "string" }, "expires_at": { "type": "string" }, "skipped": { "type": "object", "propertyNames": { "type": "string", "enum": [ "generating", "failed", "whiteboard", "unrendered", "empty", "unsupported", "nested", "inaccessible" ] }, "additionalProperties": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 } } }, "required": [ "project_id", "download_url", "expires_at", "skipped" ], "additionalProperties": false}