File programs: update, delete
The File Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for File, one group of File programs.
File.update
Changes the given properties of a File. Verb page.
do: return await $.File.update(input)Emits File.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the File. |
contentType | string | The media type, such as application/. | |
size | integer | The size in bytes. | |
name | string | The file name it was uploaded with. | |
visibility | string | Who may read it: Owner, Customer, or Public. The default is Owner. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
file | File | required | The File. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.File.update({ id: 'file_V1AuhyCTsH', size: 1 })"
}
}File.delete
Deletes a File: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.File.delete(input)Emits File.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the File. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
file | File | required | The File. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
{
"name": "do",
"arguments": {
"code": "return await $.File.delete({ id: 'file_V1AuhyCTsH' })"
}
}