Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

delete_transactions_bulk

Destructive

Permanently delete up to 500 transactions by their IDs. Note: cannot delete split or group parents or members; unsplit or ungroup them first.

Instructions

Bulk-delete transactions by ID (1-500). Fails if any ID is a split or group parent, or part of a split/group; unsplit or ungroup those first. Irreversible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesArray of transaction IDs to delete (1-500).

Implementation Reference

  • The handler function for the delete_transactions_bulk tool. It calls api.delete('/transactions', { ids }) with the provided transaction IDs. On a 204 response, it returns a success message; otherwise, it handles errors appropriately.
    async ({ ids }) => {
        try {
            const response = await api.delete("/transactions", { ids });
    
            if (response.status === 204) {
                return successResponse(
                    `Deleted ${ids.length} transaction(s).`,
                );
            }
    
            if (!response.ok) {
                return handleApiError(
                    response,
                    "Failed to bulk delete transactions",
                );
            }
    
            return dataResponse(await response.json());
        } catch (error) {
            return catchError(error, "Failed to bulk delete transactions");
        }
    },
  • Input schema for delete_transactions_bulk: accepts an array of 1-500 numeric transaction IDs.
        "Bulk-delete transactions by ID (1-500). Fails if any ID is a split or group parent, or part of a split/group; unsplit or ungroup those first. Irreversible.",
    inputSchema: {
        ids: z
            .array(z.coerce.number())
            .min(1)
            .max(500)
            .describe("Array of transaction IDs to delete (1-500)."),
    },
  • Registration of the delete_transactions_bulk tool via server.registerTool(), including description, input schema, destructive annotation, and the handler callback.
    server.registerTool(
        "delete_transactions_bulk",
        {
            description:
                "Bulk-delete transactions by ID (1-500). Fails if any ID is a split or group parent, or part of a split/group; unsplit or ungroup those first. Irreversible.",
            inputSchema: {
                ids: z
                    .array(z.coerce.number())
                    .min(1)
                    .max(500)
                    .describe("Array of transaction IDs to delete (1-500)."),
            },
            annotations: {
                destructiveHint: true,
            },
        },
        async ({ ids }) => {
            try {
                const response = await api.delete("/transactions", { ids });
    
                if (response.status === 204) {
                    return successResponse(
                        `Deleted ${ids.length} transaction(s).`,
                    );
                }
    
                if (!response.ok) {
                    return handleApiError(
                        response,
                        "Failed to bulk delete transactions",
                    );
                }
    
                return dataResponse(await response.json());
            } catch (error) {
                return catchError(error, "Failed to bulk delete transactions");
            }
        },
    );
Behavior5/5

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

The description adds critical behavioral context beyond the destructiveHint annotation: it specifies the exact failure conditions (split/group involvement) and confirms irreversibility. No contradiction with annotations.

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?

Two sentences, no redundant information. The first sentence states purpose, the second adds constraints and warnings. Perfectly front-loaded.

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

Completeness5/5

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

For a single-parameter bulk delete tool with a destructive hint, the description covers the action, limits, preconditions, and warning. No output schema needed; the information is sufficient for correct invocation.

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%, so the schema already documents the 'ids' parameter fully. The description echoes the count constraint (1-500) but adds no new semantic detail beyond the schema.

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

Purpose5/5

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

The description clearly states the action (bulk-delete), resource (transactions), and scope (by ID, 1-500). It distinguishes itself from sibling tools like delete_transaction (singular) and delete_transaction_group (different resource).

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

Usage Guidelines4/5

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

The description provides explicit when-not-to-use conditions: fails if the ID is a split/group parent or part of a split/group, and advises to unsplit or ungroup first. It also notes irreversibility. However, it does not explicitly name alternative tools.

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/akutishevsky/lunchmoney-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server