get_account
Retrieve detailed information about a specific YNAB account by providing budget and account IDs to access balance, transactions, and account settings.
Instructions
Get detailed information about a specific account.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | Yes | The budget ID | |
| account_id | Yes | The account ID |
Implementation Reference
- src/index.ts:49-51 (handler)The core handler function in YNABClient that fetches the specific account details from the YNAB API endpoint.async getAccount(budgetId: string, accountId: string) { return this.request<{ account: any }>(`/budgets/${budgetId}/accounts/${accountId}`); }
- src/index.ts:120-123 (schema)Zod schema used for input validation in the get_account tool handler.const AccountSchema = z.object({ budget_id: z.string().describe("The budget ID"), account_id: z.string().describe("The account ID"), });
- src/index.ts:182-193 (registration)MCP tool registration definition including name, description, and JSON input schema.{ name: "get_account", description: "Get detailed information about a specific account.", inputSchema: { type: "object" as const, properties: { budget_id: { type: "string", description: "The budget ID" }, account_id: { type: "string", description: "The account ID" }, }, required: ["budget_id", "account_id"], }, },
- src/index.ts:331-335 (handler)Tool dispatch logic in the MCP CallToolRequest handler that parses arguments and invokes the getAccount method.case "get_account": { const { budget_id, account_id } = AccountSchema.parse(args); result = await client.getAccount(budget_id, account_id); break; }