Gokapi Files
gokapi_filesManage Gokapi file shares by uploading, listing, retrieving, modifying, duplicating, replacing, deleting, restoring, and changing ownership of stored files via a single operation-based interface.
Instructions
gokapi files operations on Gokapi. Pass operation and an arguments dict matching that operation's parameters.
gokapi_files_add(file_b64, filename, allowed_downloads=None, expiry_days=None, password=None) - Upload a file without chunking (POST /api/files/add, multipart). The file is a base64 string. allowed_downloads defaults to 1 (0 = unlimited), expiry_days defaults to 14 (0 = unlimited).
gokapi_files_change_owner(id, new_owner) - Change a file's owner (PUT /api/files/changeOwner, admin only). new_owner is the target user ID.
gokapi_files_delete(id, delay=None) - Delete a file (DELETE /api/files/delete). delay waits N seconds before deleting so the file can still be restored.
gokapi_files_duplicate(id, allowed_downloads=None, expiry_days=None, password=None, original_password=None, filename=None) - Duplicate a file (POST /api/files/duplicate). Returns the new file object. Set original_password=true to keep the source password.
gokapi_files_get(id) - Get file metadata by ID (GET /api/files/list/{id}).
gokapi_files_list(show_file_requests=None) - List all files (GET /api/files/list). Set show_file_requests to include files uploaded through file requests.
gokapi_files_modify(id, allowed_downloads=None, expiry_timestamp=None, password=None, original_password=None) - Change parameters of an uploaded file (PUT /api/files/modify). allowed_downloads 0 = unlimited; expiry_timestamp 0 (unix) = no expiry; omit password to leave it unchanged, pass empty string to remove it.
gokapi_files_replace(id, id_new_content, delete_new_file=None) - Replace a file's content with another uploaded file (PUT /api/files/replace). Set delete_new_file=true to delete the source file afterwards.
gokapi_files_restore(id) - Restore a file pending deletion (POST /api/files/restore).
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": {
"operation": "<operation>"
},
"name": "gokapi_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | No | ||
| operation | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |