Skip to main content
Glama
justmytwospence

ynab-mcp

delete_transaction

Remove a transaction from your YNAB budget to correct errors or update financial records. Specify the budget and transaction ID to delete unwanted entries.

Instructions

[1 API call] Delete a transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budget_idNoBudget ID or 'last-used'last-used
transaction_idYesThe transaction ID to delete

Implementation Reference

  • Registration of the delete_transaction tool including input schema.
    server.registerTool("delete_transaction", {
      title: "Delete Transaction",
      description: "[1 API call] Delete a transaction",
      inputSchema: {
        budget_id: z.string().default("last-used").describe("Budget ID or 'last-used'"),
        transaction_id: z.string().describe("The transaction ID to delete"),
      },
      annotations: { readOnlyHint: false, destructiveHint: true },
  • Implementation handler for the delete_transaction tool.
    }, async ({ budget_id, transaction_id }) => {
      try {
        const response = await getClient().transactions.deleteTransaction(budget_id, transaction_id);
        const t = response.data.transaction;
        return textResult(`Deleted transaction: ${t.date} | ${formatCurrency(t.amount)} | ${t.payee_name ?? "No payee"}\nID: ${t.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