Skip to main content
Glama
justmytwospence

ynab-mcp

Delete Transaction

delete_transaction
Destructive

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);
      }
    });
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is a destructive, non-read-only operation. The description adds minimal context with '[1 API call]', hinting at a single network request, but does not disclose further behavioral traits like error handling, permissions required, or irreversible effects beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two short phrases, front-loading the key action ('Delete a transaction') and adding a minor operational note ('[1 API call]'). Every word serves a purpose, with no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's destructive nature and lack of output schema, the description is minimally complete but lacks depth. It covers the basic action and API call count, but does not address potential outcomes, error scenarios, or confirmation needs, leaving gaps for an agent to infer behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, fully documenting both parameters. The description does not add any semantic details beyond the schema, such as explaining the implications of 'budget_id' defaulting to 'last-used'. Baseline score of 3 applies as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Delete') and resource ('a transaction'), making the purpose unambiguous. However, it does not differentiate this tool from sibling tools like 'delete_scheduled_transaction' or other deletion operations, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., 'delete_scheduled_transaction' or other transaction-related tools). It lacks context about prerequisites, such as needing a valid transaction ID, or exclusions, leaving the agent without usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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