Actions Component
Action components help your app collect user approval before running tools that change external state.
html
<configure-tool-approval
tool="configure_email_send"
action-id="act_123"
timeout-seconds="60">
</configure-tool-approval>
<script>
// Tool parameters are a JS property, not attributes:
document.querySelector("configure-tool-approval").params = {
to: "user@example.com",
subject: "Draft follow-up",
};
</script>| Attribute | Type | Description |
|---|---|---|
tool | string | Tool name to approve, for example configure_email_send. |
action-id | string | Your identifier for this pending action; echoed in decision events. |
timeout-seconds | number | Countdown; at 0 the component auto-emits configure:tool-deny. |
params | object (JS property) | The tool arguments to display. Set as a property, never an attribute. |
| Event | Detail | Description |
|---|---|---|
configure:tool-approve | { actionId } | User approved. Execute the tool server-side. |
configure:tool-deny | { actionId } | User denied, or the countdown hit zero. |
configure:tool-always-allow | { actionId } | User approved and asked to skip future prompts for this tool. |
Use action approval UI before executing action tools such as:
configure_email_sendconfigure_calendar_create_eventconfigure_sheets_values_updateconfigure_sheets_values_append
The component does not call model tools by itself. Your server still decides which actions the app supports through profile.tools({ actions }) and executes only authorized calls with profile.executeTool().