Manage budget files
manage_budget_filesSwitch the active budget, import a budget file, or export the active budget to a file by choosing one action.
Instructions
Switch the active budget, import a budget file, or export the active budget to a file; pick one action. To list the configured budget names use list_entities with type budget_file; budget months are manage_budget_months. Other fields are refused.
switch: budget_name; takes effect now in this session; other open sessions keep theirs; remembered per caller, so a new session of the same caller starts on it (holders of the one legacy bearer token are one caller); an unconfigured or not permitted name is refused. Locked budgets cannot be switched to.
switch loads the target budget, and a load failure can surface on the next call instead; undo it by switching back.
import: exactly one of path (a file on the server, max 4096 characters) or base64 (max 67108864 characters); optional type (actual, ynab4, ynab5; default actual), filename (base64 only); a caller limited to some budgets is refused; a long import can time out.
import ADDS a budget and replaces nothing: each import makes a new local copy and normally uploads it as a NEW server budget file (a failed upload leaves it local only); the returned budgetId is that local id, not a Sync ID; confirm before importing.
After an import, success or failure, the next call from every session (this one included) reloads that session's own configured budget, so later calls do not reach the imported budget; to use it, an operator adds its Sync ID to the server configuration. Nothing removes the uploaded server file.
export: optional filename; writes the whole active budget (every account and transaction) as a .zip into the server's export directory and OVERWRITES a file of the same name; the file contents are not returned; only deleting the file on the server host removes it.
Returns { success, budgetName, budgetId, serverUrl, message } (switch), { result: { success, budgetId, type, source, message } } (import), { result: { success, path, filename, directory, bytes, sha256, message } } (export).
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": {
"action": "<action>"
},
"name": "manage_budget_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | import: path of the export file ON THE SERVER; give exactly one of path and base64. | |
| type | No | import: format; omit for actual (an Actual .zip export). | |
| action | Yes | ||
| base64 | No | import: the export file contents, base64-encoded; give exactly one of path and base64. | |
| filename | No | import: original file name, only with base64. export: output name without a directory, letters, digits, dot, underscore, hyphen; ".zip" is appended; omit for a timestamped name. Max 120. | |
| budget_name | No | Exact configured budget name (list with list_entities type budget_file), case-insensitive, max 120 characters. |