Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

remove_budget

Delete a budget assigned to a specific category for a given month in LunchMoney, helping users manage their financial planning by removing outdated or incorrect budget allocations.

Instructions

Remove a budget for a specific category and month

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • The handler function for the 'remove_budget' tool. It constructs a DELETE request to the Lunch Money API to remove the budget for the specified category and month, returning success or error message.
    async ({ input }) => {
        const { baseUrl, lunchmoneyApiToken } = getConfig();
    
        const params = new URLSearchParams({
            start_date: input.start_date,
            category_id: input.category_id.toString(),
        });
    
        const response = await fetch(`${baseUrl}/budgets?${params}`, {
            method: "DELETE",
            headers: {
                Authorization: `Bearer ${lunchmoneyApiToken}`,
            },
        });
    
        if (!response.ok) {
            return {
                content: [
                    {
                        type: "text",
                        text: `Failed to remove budget: ${response.statusText}`,
                    },
                ],
            };
        }
    
        return {
            content: [
                {
                    type: "text",
                    text: "Budget removed successfully",
                },
            ],
        };
    }
  • Zod input schema defining parameters for the 'remove_budget' tool: start_date (string) and category_id (number).
    input: z.object({
        start_date: z
            .string()
            .describe("Budget month start date in YYYY-MM-DD format"),
        category_id: z
            .number()
            .describe("Category ID for the budget to remove"),
    }),
  • Registration of the 'remove_budget' tool on the MCP server within the registerBudgetTools function, including description, input schema, and inline handler.
    server.tool(
        "remove_budget",
        "Remove a budget for a specific category and month",
        {
            input: z.object({
                start_date: z
                    .string()
                    .describe("Budget month start date in YYYY-MM-DD format"),
                category_id: z
                    .number()
                    .describe("Category ID for the budget to remove"),
            }),
        },
        async ({ input }) => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
    
            const params = new URLSearchParams({
                start_date: input.start_date,
                category_id: input.category_id.toString(),
            });
    
            const response = await fetch(`${baseUrl}/budgets?${params}`, {
                method: "DELETE",
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                },
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to remove budget: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            return {
                content: [
                    {
                        type: "text",
                        text: "Budget removed successfully",
                    },
                ],
            };
        }
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Remove' implies a destructive operation, but the description doesn't disclose whether this is permanent or reversible, what permissions are required, if there are side effects (e.g., affecting related data), or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a simple tool and front-loads the essential information.

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

Completeness2/5

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

For a destructive tool with no annotations, no output schema, and 0% schema description coverage, the description is insufficient. It doesn't explain what 'remove' entails behaviorally, what the return value might be, or how errors are handled. Given the complexity and lack of structured data, more context is needed for safe and effective use.

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?

The description mentions 'category and month' which aligns with the two parameters (category_id and start_date), but schema description coverage is 0%, meaning parameters are undocumented in the schema. The description adds minimal semantic context (it identifies what the parameters represent) but doesn't provide format details, constraints, or examples to compensate for the schema gap.

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 ('remove') and target ('a budget for a specific category and month'), which is specific and actionable. However, it doesn't distinguish this tool from sibling tools like 'delete_category' or 'force_delete_category' that also perform deletion operations, missing an opportunity for differentiation.

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. With siblings like 'delete_category' and 'force_delete_category' that handle deletions, there's no indication of whether this tool is for budget-specific removal, what prerequisites exist, or when other deletion tools might be more appropriate.

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