ofw_create_expense
Log a new expense in OurFamilyWizard with title, amount, date, category, payer, and children; optionally attach a receipt PDF or make it private. Requires confirmation before writing.
Instructions
Log a new expense in OurFamilyWizard using the current web-app expense contract. Required fields are title, amount, purchaseDate, categoryId, payerId (the parent who owes), and at least one child user id. Supports one previously-uploaded receipt PDF and private entries. privateExpense=true creates an expense visible only to you; false/default creates the normal shared expense. receiptFileId should come from ofw_upload_expense_pdf. A shared expense is a money claim that appears in the ledger in front of the co-parent immediately, and this server cannot delete it. If the request fails without a definitive answer the result is EXPENSE_UNCONFIRMED: the expense may already exist, so do NOT retry until ofw_list_expenses shows it did not land. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call performs NO write and returns a preview of exactly what would happen plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Expense title/name shown in the OFW expense log | |
| amount | Yes | Full expense amount before OFW applies the category split | |
| payerId | Yes | OFW userId of the parent who owes/reimburses this expense | |
| children | Yes | One or more OFW child userIds associated with the expense | |
| categoryId | Yes | OFW expense category id (for example General is commonly id 1; use the id from OFW, not the category display name) | |
| description | No | Optional supporting description/details for the expense | |
| 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. | |
| purchaseDate | Yes | Date the expense was incurred, YYYY-MM-DD | |
| receiptFileId | No | Single OFW My Files fileId to attach as the receipt, normally returned by ofw_upload_expense_pdf | |
| privateExpense | No | true = visible only to you; false/default = shared with co-parent |