Update project budget
well_update_project_budgetSet one budget cell of a project: the amount a budget version plans on one revenue or expense ledger account in one fiscal month, in the workspace base currency.
Use this when the person states a budget, a plan or a target for a project, e.g. "plan 12 000 of consulting revenue on Acme in March". Budget rows are kept apart from actual rows: well_get_project_margin shows a budget beside the booked figures of the same fiscal period and never sums one into the other.
REQUIRED: project_id (from well_list_projects), version_name, fiscal_year, fiscal_period (1 to 12), ledger_account_id (a live REVENUE or EXPENSE account of this workspace, from a one-row well_query_records lookup on ledger accounts), amount (a decimal string, zero or more, at most 4 decimals). OPTIONAL: currency — when set, it must be the workspace base currency.
The first cell of a new version_name creates that version: a monthly draft budget in the base currency over the fiscal year of that cell. A later cell outside that fiscal year is refused; name another version for another year. A second call for the same version, project, account and fiscal month replaces the amount and returns created: false. An unknown project or account, an account that is neither revenue nor expense, a currency other than the base currency, a fiscal month before the company's first fiscal period, and a version of that name that is not an open monthly budget are each refused, and nothing is written. Ask the person for a missing value; never guess an account or a version.
Returns { success: true, allocation_id, forecast_id, forecast_name, project_id, fiscal_year, fiscal_period, account_number, currency, amount, created } on success, or { success: false, error } on failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The planned amount as a decimal string, zero or more, with at most 4 decimals, e.g. 12500.00. | |
| currency | No | The ISO 4217 currency of amount. Optional; when set it must be the workspace base currency. | |
| project_id | Yes | The live project the budget is for, from well_list_projects. | |
| fiscal_year | Yes | The fiscal year of the cell, 2000 to 2100, as journal entries are stamped, e.g. 2026. | |
| version_name | Yes | The budget version, by name, e.g. FY2026 budget. The first cell of a new name creates a monthly draft budget over that cell's fiscal year. | |
| workspace_id | No | Target workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which. | |
| fiscal_period | Yes | The fiscal month of the cell, 1 for the first month of the fiscal year through 12. | |
| conversation_id | No | The conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation. | |
| idempotency_key | No | Optional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation. | |
| workspace_scope | No | Restrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace. | |
| ledger_account_id | Yes | A live REVENUE or EXPENSE ledger account of this workspace; its type makes the amount revenue or expense. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | ||
| amount | No | ||
| created | No | ||
| success | Yes | ||
| currency | No | ||
| project_id | No | ||
| fiscal_year | No | ||
| forecast_id | No | ||
| reply_lines | No | ||
| allocation_id | No | ||
| fiscal_period | No | ||
| forecast_name | No | ||
| account_number | No | ||
| conversation_id | No | The conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation. | |
| near_candidates | No | ||
| newly_connected | No | Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later. | |
| conversation_id_note | No | Present only when the server opened a fresh lane, stating that no choice recorded earlier was read. | |
| conversation_id_source | No | Where the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened. | |
| near_candidates_truncated | No |