Edit Shared Bill
update_billUse this when the user asks to edit an existing shared bill: correct an item, rename it, add or remove purchases, add tips by participant count, or divide a shared dish into selectable portions. Replaces the complete content of a public bill owned by the connected user, whether created from a receipt or from words in chat. Do not use for a new bill, a hypothetical question or recording which items a participant chose; use create_bill or set_bill_selections_batch for those respective actions. Supply the existing bill_id and every item to keep, preserving existing item IDs; omitted items and their selections are deleted. New items use an empty ID. Do not send a partial list to correct one item. Each item total_price must equal unit_price times quantity and bill total_price must equal the sum of item totals in one currency. Include taxes in eligible item prices under local rules, never as standalone items. Keep the printed receipt total or an explicitly corrected user-supplied total fixed; resolve mismatches by rechecking extraction and arithmetic, never by balancing adjustments. Support requested edits in chat, including tips and shared portions. For total tips of EUR 50 for 5 people, add one selectable item with quantity 5 and unit_price EUR 10; ask if participant count is missing. Explicitly requested additions or removals change the total only by their exact amount; do not add included tips twice. To split a shared item, set quantity to the requested portion count and divide its existing tax-inclusive line total by that count, preserving line and bill totals. If division is not exact in currency minor units, clarify the allocation before writing. Retained item IDs preserve selected quantities without rescaling; clarify the effect before changing the meaning of units on an already selected item. Returns the updated bill and the same share_url. Requires OAuth; no profile lookup is needed.
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": {
"bill_id": "<bill_id>",
"title": "<title>",
"info": "<info>",
"total_price": "<total_price>",
"items": "<items>"
},
"name": "update_bill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| info | Yes | Relevant bill notes, for example shared portions or an explicitly requested tip addition; omit receipt personal data | |
| items | Yes | Complete bill item list in one currency; updates delete omitted items and their selections | |
| title | Yes | Short bill title based on the user's description, for example Dinner with friends | |
| bill_id | Yes | Bill ID to update | |
| total_price | Yes | Final printed receipt total or explicit user-supplied total; keep that control total fixed. For items described in chat without a supplied total, calculate the exact item sum. Only explicit user-requested additions or removals change a reconciled total by their exact amount; record them in info. Splitting items preserves the total. Never hide inconsistent inputs or invent balancing adjustments |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Bill ID | |
| info | Yes | Additional bill information | |
| items | Yes | Bill items with selections | |
| title | Yes | Bill title | |
| owner_id | Yes | Bill owner user ID | |
| share_url | Yes | Bill share URL | |
| created_at | Yes | Creation time in RFC3339 UTC | |
| updated_at | Yes | Update time in RFC3339 UTC |