update_commitment
Change a commitment status, add a History note, attach context messages, or fix its title. Always get_commitment first, explain the exact change and obtain user confirmation. addContext attaches up to 10 messages, including another chat in the same organization; find messageId with get_whatsapp_conversation. Context alone does not change status. status can be owed (reopen), delivered (we did it), cancelled (no longer needed), or automatic (return control to Observer). confirmed/disputed come only from the customer in chat. A manual status wins over Observer until automatic. Status requires a reason in note. Requires commitments:write; on INSUFFICIENT_SCOPE reconnect and approve it. On VERSION_CONFLICT read again, show the new state and reconfirm. Reuse the same idempotencyKey only for retries of this exact change. There is no delete.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"commitmentId": "<commitmentId>",
"expectedVersion": "<expectedVersion>",
"confirmed": "<confirmed>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "update_commitment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Why this change is needed; required with status. Saved in History. | |
| title | No | ||
| status | No | Set by hand, or automatic to return control to Observer. Only the customer can confirm/dispute in chat. | |
| confirmed | Yes | Must be true only after the user explicitly confirms this exact operation | |
| addContext | No | Attach up to 10 messages as context without changing status | |
| commitmentId | Yes | ID from list_commitments, then get_commitment for the current version | |
| idempotencyKey | Yes | A unique identifier generated once for this intended write. Reuse exactly when retrying. | |
| expectedVersion | Yes | Current version from get_commitment; read again on VERSION_CONFLICT |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| success | No |