sw_attach_receipt
Attach or replace a receipt image or PDF on an existing Splitwise expense without altering its cost, split, or description. Provide upload_id, local path, or base64; Splitwise must store the file.
Instructions
Attach (or replace) the receipt image or PDF on an existing Splitwise expense. Changes nothing else on the expense — cost, split and description are not sent. Pass the file as receipt.upload_id (hosted: upload it first via sw_get_upload_url — no bytes in the tool call), receipt.path (local) or receipt.base64. Fails if Splitwise does not store the file. An upload_id is deleted from the upload store once the file is stored (upload_deleted in the reply). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call returns a preview and a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| receipt | Yes | Receipt to attach: PNG, JPEG, GIF or PDF, up to 10 MiB. Give exactly one of upload_id, path or base64. The type is detected from the file contents. Replaces any receipt already on the expense. | |
| expense_id | Yes | ID of the expense to attach the receipt to | |
| confirmToken | No | ONLY for the two-step confirmation fallback (a client without MCP elicitation). The confirmToken from this same tool's phase-1 "confirmation-required" response, passed back ONLY after the user has seen that preview and explicitly approved it in chat — never on the first call, never invented, never reused. Call again with the same arguments. Ignored when the client supports elicitation. |