list_payee_transactions
Retrieve transaction history for a specific payee in YNAB budgets to track spending patterns and analyze financial behavior.
Instructions
[1 API call] List transactions for a specific payee
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
| payee_id | Yes | The payee ID | |
| since_date | No | Only return transactions on or after this date (YYYY-MM-DD) | |
| type | No | Filter by type | |
| last_knowledge_of_server | No | Delta request token |
Implementation Reference
- src/tools/transactions.ts:355-364 (handler)The handler logic that executes `getTransactionsByPayee` and formats the results.
try { const response = await getClient().transactions.getTransactionsByPayee( budget_id, payee_id, since_date, type, last_knowledge_of_server ); const txns = response.data.transactions; if (txns.length === 0) return textResult("No transactions found for this payee."); const lines = txns.map(formatTransaction); return textResult(`Payee Transactions (${txns.length}):\n${lines.join("\n")}`); } catch (e: any) { return errorResult(e.message); - src/tools/transactions.ts:343-354 (registration)The tool registration with schema definition for input parameters.
server.registerTool("list_payee_transactions", { title: "List Payee Transactions", description: "[1 API call] List transactions for a specific payee", inputSchema: { budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"), payee_id: z.string().describe("The payee ID"), since_date: z.string().optional().describe("Only return transactions on or after this date (YYYY-MM-DD)"), type: z.enum(TRANSACTION_TYPES).optional().describe("Filter by type"), last_knowledge_of_server: z.number().optional().describe("Delta request token"), }, annotations: { readOnlyHint: true }, }, async ({ budget_id, payee_id, since_date, type, last_knowledge_of_server }) => {