Component programs: update, delete
The Component Verbs update, delete as MCP do programs, with inputs, result, refusals and an example.
Reference for Component, one group of Component programs.
Component.update
Changes the given properties of a Component. Verb page.
do: return await $.Component.update(input)Emits Component.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Component. |
name | string | The name a Template places it by, such as Pricing. | |
props | json | The schema of the props it accepts. | |
region | string | Where it sits: header, section, footer, or notice. | |
interactive | boolean | True when it runs code in the browser; it still renders a static still without it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
component | Component | required | The Component. |
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 $.Component.update({ id: 'component_1qALyfTlfx', name: 'Leaseline' })"
}
}Component.delete
Deletes a Component: a soft delete that keeps its history, undone by Thing.restore. Verb page.
do: return await $.Component.delete(input)Emits Component.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Component. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
component | Component | required | The Component. |
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 $.Component.delete({ id: 'component_1qALyfTlfx' })"
}
}