Confirming Actions
Lab orders, appointment changes, Inbox replies and changes to the profile, health profile, lab results and devices 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 (with a key) | Charges the card and creates the order | purchases |
initializeLabOrder | Sends the paid order to the lab | labs:order |
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.
Changes to what the user already has
From an AI app connected by signing in, or with a key, these tools change nothing when called: they return a preview with the fields they would change, as they are now (current) and as they would be (new), and a pendingId. confirm_action makes the change, and the tool's own checks run then.
| Tool | What confirm_action does | Permission |
|---|---|---|
updateProfile, updateUserContactData | Changes the profile fields | profile:write |
updateHealthProfile | Changes the health profile answers | profile:write |
resetHealthProfileSection | Clears a health profile section | profile:write |
disconnectIntegration | Disconnects the device | profile:write |
updateLabResultStatus, updateLabResultBiomarker, updateLabResultMetadata | Approves, rolls back or reprocesses the lab result, or changes its values | documents:write |
confirm_action
| Parameter | Notes |
|---|---|
pendingId | Required. From the preview the user approved |
confirmText | Optional. The preview's confirmText, word for word. The app shows it when asking you to approve; a different text runs nothing |
Every preview returns a confirmText, one sentence naming the action (for example Book the Comprehensive panel blood draw on Tue 2 Dec 2026, 9:30 AM (America/New_York) at Quest, 1 Main St). Pass it with the pendingId so the approval prompt shows what will happen. If it does not match the preview, nothing runs and the answer names the right sentence.
- 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.

