Document programs: update, delete
The Document Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Document, one group of Document programs.
Document.update
Changes the given properties of a Document. Verb page.
do: return await $.Document.update(input)Emits Document.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Document. |
form | string | One of document, deck, or sheet. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
document | Document | required | The Document. |
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 $.Document.update({ id: 'document_af2wijcmRy', form: 'document' })"
}
}Document.delete
Deletes a Document: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Document.delete(input)Emits Document.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Document. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
document | Document | required | The Document. |
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 $.Document.delete({ id: 'document_af2wijcmRy' })"
}
}