get_month
Retrieve detailed budget information for a specific month, including all category balances, to analyze spending and track financial progress.
Instructions
Get detailed budget information for a specific month including all category balances.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | Yes | The budget ID | |
| month | Yes | The budget month (YYYY-MM-01) |
Implementation Reference
- src/index.ts:385-389 (handler)MCP tool handler for 'get_month': parses arguments using MonthSchema and invokes the YNABClient.getMonth method.case "get_month": { const { budget_id, month } = MonthSchema.parse(args); result = await client.getMonth(budget_id, month); break; }
- src/index.ts:110-112 (helper)YNABClient method implementing the core logic: fetches the specific month's budget data from the YNAB API.async getMonth(budgetId: string, month: string) { return this.request<{ month: any }>(`/budgets/${budgetId}/months/${month}`); }
- src/index.ts:144-147 (schema)Zod schema used to validate and parse input arguments for the get_month tool.const MonthSchema = z.object({ budget_id: z.string().describe("The budget ID"), month: z.string().describe("The budget month in ISO format (YYYY-MM-01)"), });
- src/index.ts:278-289 (registration)Registers the 'get_month' tool in the MCP tools list, including name, description, and JSON input schema.{ name: "get_month", description: "Get detailed budget information for a specific month including all category balances.", inputSchema: { type: "object" as const, properties: { budget_id: { type: "string", description: "The budget ID" }, month: { type: "string", description: "The budget month (YYYY-MM-01)" }, }, required: ["budget_id", "month"], }, },