Skip to main content
Glama
jeangnc

YNAB MCP Server

by jeangnc

list_payees

Retrieve all payees associated with a specific budget to track spending sources and manage transaction categorization.

Instructions

Get all payees for a budget.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idYesThe budget ID

Implementation Reference

  • The core handler function in the YNABClient class that fetches the list of payees for a given budget ID from the YNAB API.
    async listPayees(budgetId: string) {
      return this.request<{ payees: any[] }>(`/budgets/${budgetId}/payees`);
    }
  • Zod schema for validating the budget_id input parameter used in the list_payees tool.
    const BudgetIdSchema = z.object({
      budget_id: z.string().describe("The budget ID (use 'last-used' for most recent)"),
    });
  • src/index.ts:245-255 (registration)
    The tool registration object defining the name, description, and JSON input schema for the 'list_payees' tool in the list of available tools.
    {
      name: "list_payees",
      description: "Get all payees for a budget.",
      inputSchema: {
        type: "object" as const,
        properties: {
          budget_id: { type: "string", description: "The budget ID" },
        },
        required: ["budget_id"],
      },
    },
  • The switch case in the MCP CallToolRequest handler that parses arguments using BudgetIdSchema and calls the listPayees method.
    case "list_payees": {
      const { budget_id } = BudgetIdSchema.parse(args);
      result = await client.listPayees(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