Policy programs: update, delete
The Policy Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Policy, one group of Policy programs.
Policy.update
Changes the given properties of a Policy. Verb page.
do: return await $.Policy.update(input)Emits Policy.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Policy. |
rule | text | The ruling, stated so code can apply it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
policy | Policy | required | The Policy. |
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 $.Policy.update({ id: 'policy_rTYxr62HGB', rule: 'Example rule' })"
}
}Policy.delete
Deletes a Policy: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Policy.delete(input)Emits Policy.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Policy. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
policy | Policy | required | The Policy. |
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 $.Policy.delete({ id: 'policy_rTYxr62HGB' })"
}
}