Skip to main content
Glama
jeangnc

YNAB MCP Server

by jeangnc

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
NameRequiredDescriptionDefault
budget_idYesThe budget ID
monthYesThe budget month (YYYY-MM-01)

Implementation Reference

  • 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;
    }
  • 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}`);
    }
  • 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"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jeangnc/ynab-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server