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
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | Yes | The budget ID |
Implementation Reference
- src/index.ts:98-100 (handler)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`); }
- src/index.ts:116-118 (schema)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"], }, },
- src/index.ts:367-371 (handler)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; }