Skip to main content
Glama
jeangnc

YNAB MCP Server

by jeangnc

list_categories

Retrieve all budget categories with their groups, budgeted amounts, and activity data for financial tracking and analysis.

Instructions

Get all categories for a budget, grouped by category group. Includes budgeted amounts and activity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYesThe budget ID

Implementation Reference

  • Core implementation of list_categories tool in YNABClient class: fetches category groups from YNAB API endpoint.
    async listCategories(budgetId: string) { return this.request<{ category_groups: any[] }>(`/budgets/${budgetId}/categories`); }
  • src/index.ts:194-204 (registration)
    Registration of the list_categories tool in the tools array, including name, description, and input schema definition.
    { name: "list_categories", description: "Get all categories for a budget, grouped by category group. Includes budgeted amounts and activity.", inputSchema: { type: "object" as const, properties: { budget_id: { type: "string", description: "The budget ID" }, }, required: ["budget_id"], }, },
  • Zod schema used for input validation of budget_id parameter in list_categories handler.
    const BudgetIdSchema = z.object({ budget_id: z.string().describe("The budget ID (use 'last-used' for most recent)"), });
  • Specific handler case in CallToolRequestSchema dispatcher that validates input and invokes the listCategories method.
    case "list_categories": { const { budget_id } = BudgetIdSchema.parse(args); result = await client.listCategories(budget_id); break; }

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