Confirming Actions
Purchases, appointment changes and Inbox replies run only after the user approves a preview.
How it works
- The tool that prepares the action returns a preview and a
pendingId. Nothing is charged, booked, cancelled or sent. - Show the preview to the user and ask for a clear yes.
- Call
confirm_action(pendingId). The action runs now.
Tools that prepare an action
| Tool | What confirm_action does | Permission |
|---|---|---|
purchaseLabTest | Charges the card and creates the order | purchases |
bookLabAppointment | Books the blood draw | labs:order |
rescheduleLabAppointment | Moves the appointment | labs:order |
cancelLabAppointment | Cancels the appointment | labs:order |
send_message | Sends the Inbox reply | inbox:write |
confirm_action needs the permission of the tool that prepared the action.
confirm_action
| Parameter | Notes |
|---|---|
pendingId | Required. From the preview the user approved |
- Safe to retry: the same
pendingIdagain returns the first result and never repeats the action. stalemeans the price or the appointment changed after the preview. Prepare the action again and show the new preview.- Never call it on your own initiative, and never for a preview the user did not see.

