Update expense
figa_update_expenseUpdate an expense with an explicit recurrence edit scope. expectedEditContext is the unchanged opaque context of the expense version used for the draft; legacy omission provides no stale-form protection. EXPENSE_WRITE_CONFLICT rejects the entire save without a replacement context. Substituting fresh context on an old draft bypasses that protection. Existing seriesContext, expectedRevision and previewToken requirements still apply. categoryInput omission preserves category; null clears it in the selected scope. Invalid IDs and empty drafts are errors. Named category drafts may create a local sibling distinct from same-named categories elsewhere. Mutually exclusive tagIds/tagInputs replace the tag set; [] clears it and omission preserves it. tagInputs accepts IDs or {name} drafts. ALL_INSTANCES updates defaults and inherited stored tags, including history; explicit/locked overrides remain. FUTURE_INSTANCES starts at the selected scheduled occurrence, or futureFrom on a whole-series target (default now). THIS_INSTANCE sets an override. schedule: null detaches an eligible recurring occurrence with seriesContext and expectedEditContext: THIS_INSTANCE detaches only it; FUTURE_INSTANCES also stops generation and removes later saved unpaid occurrences. singleConversion availability and effect.laterUnpaidCount describe eligibility and destructive impact. Converting an unpaid one-time expense to recurrence requires schedule and THIS_INSTANCE; amountMode is fixed by default or variable for supported rhythms, using its amount as a last_confirmed starting estimate. Existing series change mode through recurringSettings instead. forecastSettings atomically changes ordinary variable settings with ALL_INSTANCES and expectedRevision matching bill settingsRevision. Optional bill confirms/corrects the selected actual invoice independently of editScope, with period, bill revision as expectedRevision, settingsRevision as expectedSettingsRevision, service activityRevision if applicable, and a fresh requestId. Guesses and forecasts are not confirmed invoices. It never marks Paid and is incompatible with amount, schedule, expenseDate, recurringSettings or range. recurringSettings changes mode from canonical scheduled from using FUTURE_INSTANCES and settingsRevision as expectedRevision, with amount for fixed or strategy/startAmount for variable; it is incompatible with amount, schedule, expenseDate or forecastSettings. Existing confirmed invoices/payments remain. range edits effective family boundaries, preserving stored dates, money and payments; omitted end preserves the last term, not the old count. occurrenceDate edits only this occurrence independently of editScope and is incompatible with expenseDate. Range edits require current seriesContext; the outer requestId is their identity, and changes.requestId is omitted or identical. Legacy schedule start-only requires ALL_INSTANCES on the earliest segment and uses range semantics, not rebase. Child segments require range. SERIES_RANGE_SCOPE_REQUIRED/TARGET_REQUIRED indicate wrong scope/segment; SERIES_CONTEXT_REQUIRED/CONFLICT indicate missing/stale context. BILL_OPERATION_REQUIRED excludes service ranges; SERIES_COMPOSITION_UNSUPPORTED excludes rhythm/method changes or whole-period amounts combined with range. Metadata and forecastSettings ALL can share an atomic range save; FUTURE uses the original scheduledDate. Durable rangeOperation receipts outlive the 24-hour transport cache; identical retries retain input/requestId. SERIES_REQUEST_ID_CONFLICT means different input already owns that ID. A replay may contain only rangeOperation; selection.resultExpenseId identifies the resulting expense, and the replay is not a current projection. This tool does not change expense group membership (manual series in the API). A group member cannot become recurring until detached (MANUAL_SERIES_MEMBER_CONVERSION). Changing only schedule.dueWindowEnd preserves all occurrence dates; dueBy is derived on reads. This write requires explicit user intent. A UUID requestId identifies one intended operation; identical retries retain the same ID and payload. A missing response or IDEMPOTENCY_OUTCOME_UNKNOWN, IDEMPOTENT_REQUEST_IN_PROGRESS or INTERNAL_SERVER_ERROR leaves the outcome uncertain, not a confirmed failure. A new ID can duplicate an uncertain write. Corrected inputs after a definite validation or business refusal constitute a new operation. The transport response cache lasts 24 hours; longer replay guarantees are stated above.
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": {
"workspaceId": "<workspaceId>",
"requestId": "<requestId>",
"expenseId": "<expenseId>",
"changes": "<changes>"
},
"name": "figa_update_expense"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | Fields to change plus editScope and the concurrency expectations described above. Omitted fields stay unchanged. | |
| expenseId | Yes | Expense ID as returned by expense reads: a stored expense UUID or the ID of a generated occurrence of a recurring series. | |
| requestId | Yes | Caller-generated UUID identifying this one intended write. A retry of the same write reuses the ID and payload; the same ID with different input returns IDEMPOTENCY_KEY_MISMATCH. | |
| workspaceId | Yes | ID of a workspace selected for this connection. Other workspaces are rejected. |