Manage files
manage_filesUpload or delete an encrypted file, such as a service-account JSON or a TLS key, in a project or one of its environments. A single setting belongs in manage_secrets. To read a file use reveal_values item file; to list files use list_project_items item files. Actions (arguments besides action and project):
upload (name, content; optional encoding, environment, content_type): up to 1 MB once decoded. Send text as is; for a binary file send base64 with encoding "base64", or the base64 text itself is stored. Without environment it belongs to the whole project. Uploading a name that exists adds a second file; delete the older one by id.
delete (file): removes one file (secure file or attachment) permanently, by id or by an exact name no other file shares. Errors are messages: a protected or archived project, invalid base64, a file over 1 MB, a name that matches nothing or several files. Audited. Needs files:write, the editor role and full access to the project.
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": {
"action": "<action>",
"project": "<project>"
},
"name": "manage_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | delete only: file id, or its exact name as list_project_items item files shows it | |
| name | No | upload only: file name as it will be listed, e.g. service-account.json | |
| action | Yes | What to do | |
| content | No | upload only: the file's contents, plain text, or base64 when encoding is base64 | |
| project | Yes | Project slug from list_projects, e.g. my-app, or its id (a UUID) | |
| encoding | No | upload only: how content is written, utf-8 text (default) or base64 for binary files | |
| environment | No | upload only: the environment the file belongs to (default: the whole project) | |
| content_type | No | upload only: MIME type, e.g. application/json (default: application/octet-stream) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | upload, delete: the file id | |
| name | No | upload, delete: the file's name | |
| size | No | upload: the size in bytes | |
| deleted | No | delete: true once the file is gone | |
| environment | No | upload: the environment's slug, null for the whole project |