ReferenceOrganise
restore_entries
Restore files and folders from the trash
Brings files and folders of a project the user can edit back from its Trash, with everything that was trashed inside the folders, as Restore in awen does. Pass the entry_ids trash_entries returned, within 30 days. Each comes back in its folder, or at the project root when that folder is gone. A folder is refused when another folder of its name now sits in the same place, and a memory when another of the user's memories took its name: rename that one first.
- Permission:
awen:write - Also an API operation:
POST /api/v1/restore_entries
Arguments
| Argument | Type | Required | What it is |
|---|---|---|---|
project_id | string | Yes | The project's project_id. |
entry_ids | array of string | Yes | The entry_id of each trashed file and folder to restore. |
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": "restore_entries", "arguments": { "project_id": "<string>", "entry_ids": "<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." }, "entry_ids": { "minItems": 1, "maxItems": 25, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 128, "pattern": "^[A-Za-z0-9_-]+$" }, "description": "The entry_id of each trashed file and folder to restore." } }, "required": [ "project_id", "entry_ids" ]}Answer
The answer's structuredContent follows this schema, and its text holds the same JSON.
{ "type": "object", "properties": { "project_id": { "type": "string" }, "entry_ids": { "type": "array", "items": { "type": "string" } }, "entry_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "project_id", "entry_ids", "entry_count" ], "additionalProperties": false}