Upload secure file
upload_fileStore a file, encrypted at rest, in a project or one of its environments, from UTF-8 text or base64 bytes, up to 1 MB. Use it for credential files such as a service-account JSON or a TLS key; a single setting belongs in manage_secrets. Not idempotent: uploading a name that exists adds a second file beside it (delete_item item file removes the old one). Read files back with reveal_values item file. Refused in a protected or archived project. Audited. Requires 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": {
"project": "<project>",
"name": "<name>",
"content": "<content>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name as it will be listed, e.g. service-account.json | |
| content | Yes | The file's contents: plain text, or base64 when encoding is base64 | |
| project | Yes | Project slug or id | |
| encoding | No | How content is written: utf-8 text (default), or base64 for binary files | utf-8 |
| environment | No | Environment slug or id the file belongs to (default: the whole project) | |
| content_type | No | MIME type, e.g. application/json (default: application/octet-stream) |