Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_budget_summary

Retrieve monthly budget summaries showing budgeted versus actual spending amounts for specified date ranges to monitor financial performance.

Instructions

Get budget summary for a specific date range. The budgeted and spending amounts will be broken down by month.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • Handler function that fetches the budget summary from the Lunch Money API for the given date range and currency, returns the budgets as JSON or error message.
    async ({ input }) => {
        const { baseUrl, lunchmoneyApiToken } = getConfig();
    
        const params = new URLSearchParams({
            start_date: input.start_date,
            end_date: input.end_date,
        });
    
        if (input.currency) {
            params.append("currency", input.currency);
        }
    
        const response = await fetch(`${baseUrl}/budgets?${params}`, {
            headers: {
                Authorization: `Bearer ${lunchmoneyApiToken}`,
            },
        });
    
        if (!response.ok) {
            return {
                content: [
                    {
                        type: "text",
                        text: `Failed to get budget summary: ${response.statusText}`,
                    },
                ],
            };
        }
    
        const budgets: Budget[] = await response.json();
    
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(budgets),
                },
            ],
        };
    }
  • Input schema using Zod validating start_date, end_date (required, YYYY-MM-DD monthly bounds), and optional currency.
    input: z.object({
        start_date: z
            .string()
            .describe(
                "Start date in YYYY-MM-DD format. Lunch Money currently only supports monthly budgets, so your date should be the start of a month (eg. 2021-04-01)"
            ),
        end_date: z
            .string()
            .describe(
                "End date in YYYY-MM-DD format. Lunch Money currently only supports monthly budgets, so your date should be the end of a month (eg. 2021-04-30)"
            ),
        currency: z
            .string()
            .optional()
            .describe(
                "Currency for budget (defaults to primary currency)"
            ),
    }),
  • Registration of the get_budget_summary tool on the McpServer, specifying name, description, input schema, and inline handler function.
        "get_budget_summary",
        "Get budget summary for a specific date range. The budgeted and spending amounts will be broken down by month.",
        {
            input: z.object({
                start_date: z
                    .string()
                    .describe(
                        "Start date in YYYY-MM-DD format. Lunch Money currently only supports monthly budgets, so your date should be the start of a month (eg. 2021-04-01)"
                    ),
                end_date: z
                    .string()
                    .describe(
                        "End date in YYYY-MM-DD format. Lunch Money currently only supports monthly budgets, so your date should be the end of a month (eg. 2021-04-30)"
                    ),
                currency: z
                    .string()
                    .optional()
                    .describe(
                        "Currency for budget (defaults to primary currency)"
                    ),
            }),
        },
        async ({ input }) => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
    
            const params = new URLSearchParams({
                start_date: input.start_date,
                end_date: input.end_date,
            });
    
            if (input.currency) {
                params.append("currency", input.currency);
            }
    
            const response = await fetch(`${baseUrl}/budgets?${params}`, {
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                },
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get budget summary: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const budgets: Budget[] = await response.json();
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(budgets),
                    },
                ],
            };
        }
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get budget summary') and describes the output format ('broken down by month'), but lacks critical details such as authentication requirements, rate limits, error handling, or whether it's a read-only operation. The description doesn't contradict annotations, but it's insufficient for a tool with no 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 appropriately sized and front-loaded, consisting of two clear sentences with zero waste. The first sentence states the core purpose, and the second adds essential detail about the output format, making it efficient and well-structured.

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 complexity (a read operation with date parameters), no annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and output breakdown but lacks details on behavioral traits, full parameter semantics, and return values, leaving gaps for an AI agent to infer usage.

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 'specific date range,' which aligns with the 'start_date' and 'end_date' parameters in the schema, but it doesn't add meaning beyond what the schema provides (e.g., it doesn't explain the 'currency' parameter or date formatting). With a schema description coverage of 0%, the description partially compensates by hinting at date parameters, but it's not comprehensive.

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 tool's purpose: 'Get budget summary for a specific date range' with the specific breakdown 'budgeted and spending amounts will be broken down by month.' It uses a specific verb ('Get') and resource ('budget summary') but doesn't explicitly differentiate from sibling tools like 'upsert_budget' or 'remove_budget' beyond the 'get' action.

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. It mentions the date range requirement but doesn't specify prerequisites, exclusions, or compare it to other budget-related tools like 'upsert_budget' or 'remove_budget' in the sibling list.

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