Skip to main content
Glama
jeangnc

YNAB MCP Server

by jeangnc

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
NameRequiredDescriptionDefault
budget_idYesThe budget ID
account_idYesThe account ID

Implementation Reference

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

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