delete_scheduled_transaction
Remove a scheduled transaction from a YNAB budget to cancel planned future payments and maintain accurate financial planning.
Instructions
[1 API call] Delete a scheduled transaction
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget_id | No | Budget ID or 'last-used' | last-used |
| scheduled_transaction_id | Yes | The scheduled transaction ID to delete |
Implementation Reference
- Implementation and registration of the 'delete_scheduled_transaction' tool.
server.registerTool("delete_scheduled_transaction", { title: "Delete Scheduled Transaction", description: "[1 API call] Delete a scheduled transaction", inputSchema: { budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"), scheduled_transaction_id: z.string().describe("The scheduled transaction ID to delete"), }, annotations: { readOnlyHint: false, destructiveHint: true }, }, async ({ budget_id, scheduled_transaction_id }) => { try { const response = await getClient().scheduledTransactions.deleteScheduledTransaction( budget_id, scheduled_transaction_id ); const t = response.data.scheduled_transaction; return textResult( `Deleted scheduled transaction: ${t.date_first} | ${formatCurrency(t.amount)} | ${t.payee_name ?? "No payee"}\nID: ${t.id}` ); } catch (e: any) { return errorResult(e.message); } });