get_budget_settings
Retrieve date and currency format settings for a YNAB budget to ensure consistent financial data display and reporting.
Instructions
[1 API call] Get a budget's date and currency format settings
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
Implementation Reference
- src/tools/budgets.ts:63-87 (handler)The 'get_budget_settings' tool implementation, including registration, input schema, and handler logic.
server.registerTool("get_budget_settings", { title: "Get Budget Settings", description: "[1 API call] Get a budget's date and currency format settings", inputSchema: { budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"), }, annotations: { readOnlyHint: true }, }, async ({ budget_id }) => { try { const response = await getClient().plans.getPlanSettingsById(budget_id); const s = response.data.settings; const lines = [ `Date Format: ${s.date_format?.format}`, `Currency Format:`, ` ISO Code: ${s.currency_format?.iso_code}`, ` Symbol: ${s.currency_format?.currency_symbol}`, ` Decimal Digits: ${s.currency_format?.decimal_digits}`, ` Symbol First: ${s.currency_format?.symbol_first}`, ` Display Symbol: ${s.currency_format?.display_symbol}`, ]; return textResult(lines.join("\n")); } catch (e: any) { return errorResult(e.message); } });