Skip to main content
Glama
justmytwospence

ynab-mcp

create_account

Add a new account to your YNAB budget by specifying name, type, and starting balance to organize your financial tracking.

Instructions

[1 API call] Create a new account in a budget

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
nameYesAccount name
typeYesAccount type
balanceYesStarting balance in dollars (e.g., 1000.50)

Implementation Reference

  • The implementation and registration of the 'create_account' tool in src/tools/accounts.ts.
    server.registerTool("create_account", {
      title: "Create Account",
      description: "[1 API call] Create a new account in a budget",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        name: z.string().describe("Account name"),
        type: z.enum(ACCOUNT_TYPES).describe("Account type"),
        balance: z.number().describe("Starting balance in dollars (e.g., 1000.50)"),
      },
      annotations: { readOnlyHint: false },
    }, async ({ budget_id, name, type, balance }) => {
      try {
        const response = await getClient().accounts.createAccount(budget_id, {
          account: { name, type, balance: Math.round(balance * 1000) },
        });
        const a = response.data.account;
        return textResult(`Created account "${a.name}" (${a.type}) with balance ${formatCurrency(a.balance)}\nID: ${a.id}`);
      } catch (e: any) {
        return errorResult(e.message);
      }
    });

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/justmytwospence/ynab-mcp'

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