From ecd3d53253724fad8858976e8f96cc4e23482420 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Tue, 10 Mar 2026 16:43:06 -0400 Subject: [PATCH] fix(mcp): treat "default" budgetId as fallback to configured default MCP clients pass budgetId: "default" as a literal string, which the YNAB API rejects with a 404. Now treated as a signal to use the configured default budget. Co-Authored-By: Claude Opus 4.6 --- package.json | 2 +- src/lib/api-client.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0562dea..631498d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stephendolan/ynab-cli", - "version": "2.8.1", + "version": "2.8.2", "description": "A command-line interface for You Need a Budget (YNAB)", "type": "module", "main": "./dist/cli.js", diff --git a/src/lib/api-client.ts b/src/lib/api-client.ts index 79c47a0..84031d2 100644 --- a/src/lib/api-client.ts +++ b/src/lib/api-client.ts @@ -43,7 +43,7 @@ export class YnabClient { } async getBudgetId(budgetIdOrDefault?: string): Promise { - const budgetId = budgetIdOrDefault || config.getDefaultBudget() || process.env.YNAB_BUDGET_ID; + const budgetId = (budgetIdOrDefault && budgetIdOrDefault !== 'default' ? budgetIdOrDefault : undefined) || config.getDefaultBudget() || process.env.YNAB_BUDGET_ID; if (!budgetId) { throw new YnabCliError(