Skip to main content
Glama
jeangnc

YNAB MCP Server

by jeangnc

get_budget

Retrieve comprehensive budget details including accounts, categories, and settings from YNAB to manage financial planning effectively.

Instructions

Get detailed information about a specific budget including accounts, categories, and settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYesThe budget ID (use 'last-used' for most recent)

Implementation Reference

  • The core handler function in the YNABClient class that fetches detailed budget information from the YNAB API using an HTTP request.
    async getBudget(budgetId: string) { return this.request<{ budget: any }>(`/budgets/${budgetId}`); }
  • The dispatch handler in the MCP CallToolRequestSchema that validates the input arguments and invokes the getBudget method.
    case "get_budget": { const { budget_id } = BudgetIdSchema.parse(args); result = await client.getBudget(budget_id); break; }
  • Zod schema defining the input validation for the budget_id parameter used in the get_budget tool.
    const BudgetIdSchema = z.object({ budget_id: z.string().describe("The budget ID (use 'last-used' for most recent)"), });
  • src/index.ts:160-170 (registration)
    The tool definition object registered in the tools array, providing the name, description, and input schema for list_tools.
    { name: "get_budget", description: "Get detailed information about a specific budget including accounts, categories, and settings.", inputSchema: { type: "object" as const, properties: { budget_id: { type: "string", description: "The budget ID (use 'last-used' for most recent)" }, }, required: ["budget_id"], }, },

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