Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

remove_budget

Destructive

Remove a budget for a given category and period. The request succeeds even if no budget exists, ensuring idempotent updates.

Instructions

Remove the budget for a specific category and period. The request is idempotent — succeeds even if no budget exists for the period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateYesBudget period start date in YYYY-MM-DD format. Must be a valid budget period start.
category_idYesCategory ID for the budget to remove.

Implementation Reference

  • Registration of the 'remove_budget' tool via server.registerTool(), including its input schema (start_date, category_id) and annotations (destructiveHint: true).
    server.registerTool(
        "remove_budget",
        {
            description:
                "Remove the budget for a specific category and period. The request is idempotent — succeeds even if no budget exists for the period.",
            inputSchema: {
                start_date: z
                    .string()
                    .regex(/^\d{4}-\d{2}-\d{2}$/, "Must be YYYY-MM-DD format")
                    .describe(
                        "Budget period start date in YYYY-MM-DD format. Must be a valid budget period start.",
                    ),
                category_id: z.coerce
                    .number()
                    .describe("Category ID for the budget to remove."),
            },
            annotations: {
                destructiveHint: true,
            },
        },
        async ({ start_date, category_id }) => {
            try {
                const params = new URLSearchParams({
                    start_date,
                    category_id: category_id.toString(),
                });
    
                const response = await api.delete(`/budgets?${params}`);
    
                if (!response.ok) {
                    return handleApiError(response, "Failed to remove budget");
                }
    
                return successResponse("Budget removed.");
            } catch (error) {
                return catchError(error, "Failed to remove budget");
            }
        },
    );
  • Handler function for 'remove_budget' that makes a DELETE API call to /budgets with start_date and category_id query parameters, and returns success/error responses.
    async ({ start_date, category_id }) => {
        try {
            const params = new URLSearchParams({
                start_date,
                category_id: category_id.toString(),
            });
    
            const response = await api.delete(`/budgets?${params}`);
    
            if (!response.ok) {
                return handleApiError(response, "Failed to remove budget");
            }
    
            return successResponse("Budget removed.");
        } catch (error) {
            return catchError(error, "Failed to remove budget");
        }
    },
  • Input schema for 'remove_budget': start_date (YYYY-MM-DD string) and category_id (number, coerced).
    inputSchema: {
        start_date: z
            .string()
            .regex(/^\d{4}-\d{2}-\d{2}$/, "Must be YYYY-MM-DD format")
            .describe(
                "Budget period start date in YYYY-MM-DD format. Must be a valid budget period start.",
            ),
        category_id: z.coerce
            .number()
            .describe("Category ID for the budget to remove."),
    },
  • src/index.ts:11-11 (registration)
    Import of registerBudgetTools from budgets.ts.
    import { registerBudgetTools } from "./tools/budgets.js";
  • src/index.ts:30-30 (registration)
    Call to registerBudgetTools(server) that registers the remove_budget tool among other budget tools.
    registerBudgetTools(server);
Behavior4/5

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

Description adds idempotent behavior ('succeeds even if no budget exists') beyond the destructiveHint annotation, providing useful transparency without contradiction.

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 with no fluff: first states purpose, second adds key behavioral detail. Highly concise and well-structured.

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

Completeness4/5

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

Given the tool's simplicity (2 params, no output schema, annotations present), the description covers core purpose and behavior. However, it lacks usage guidance for completeness.

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?

Input schema has 100% description coverage, and the description only restates parameters. No additional meaning is added beyond what schema provides, so baseline 3 is appropriate.

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 tool removes a budget for a specific category and period, using precise verb and resource, distinguishing it from sibling tools like upsert_budget.

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?

No guidance on when to use this tool versus alternatives such as upsert_budget or delete_category. The description only notes idempotency, not usage context.

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