Profile & State¶
Create and update operations.
Persistence (save/load) is handled client-side via /finplan:read-state and /finplan:save-state slash commands, not by the MCP server.
manage_state¶
Manage user state: create and modify financial profiles.
| Parameter | Type | Default | Description |
|---|---|---|---|
action |
string | required | Action to perform: 'create' - create new state from person info, 'update_account' - add or update account in state, 'update_goal' - add or update goal in state, 'update_person' - update (edit) person info in state, 'update_income_stream' - add or update income stream in state, 'update_expense' - add or update expense in state, 'remove_account' - remove an account by account_id, 'remove_goal' - remove a goal by goal_id, 'remove_income_stream' - remove an income stream by income_stream_id, 'remove_expense' - remove an expense by expense_id |
state_json |
object | null | Current UserState as JSON dictionary. Required for: update_account, update_goal, update_person, update_income_stream, update_expense, remove_account, remove_goal, remove_income_stream, remove_expense. |
person_json |
object | null | Person profile as JSON dict with fields: date_of_birth (YYYY-MM-DD), employment_status, annual_pretax_income_cents, marital_status, zipcode. Can also include number_of_dependents (int) which will be converted to dependents list. Required for: create. Required for: update_person. |
account_json |
object | null | Account to add/update (from create_account result). Required for: update_account. |
goal_json |
object | null | Goal to add/update (from create_goal result). Required for: update_goal. |
income_stream_json |
object | null | Income stream to add/update (from create_income_stream result). Required for: update_income_stream. |
expense_json |
object | null | Expense to add/update (from create_expense result). Required for: update_expense. |
account_id |
string | null | account_id of the account to remove. Required for: remove_account. |
goal_id |
string | null | id of the goal to remove. Required for: remove_goal. |
income_stream_id |
string | null | id of the income stream to remove. Required for: remove_income_stream. |
expense_id |
string | null | id of the expense to remove. Required for: remove_expense. |
return_full_state |
bool | false |
When False (default), mutation actions (update_*) return only the changed section plus a 'state_hash' instead of echoing the whole document back β apply the 'changed' item to the state_json you passed in to rebuild it. Set True to receive the full UserState inline (for callers that do not keep their own copy). Ignored by 'create', which always returns the full document. |
migrate_state¶
Upgrade a state document to the current schema and return it as a download.
| Parameter | Type | Default | Description |
|---|---|---|---|
state_json |
object | required | A finplan_state document to upgrade to the current schema. May be unstamped or stale; it is validated and re-stamped on the way through. |
Returns {success, urls, summary} on success (the migrated document lives at urls.data; summary carries kind, schema_hash, migrated, schema_drift, warnings), or an error envelope with structured errors when the document cannot validate.