Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

create_transaction_group

Group multiple transactions together in LunchMoney to organize related financial entries under a single payee, date, and category for better tracking.

Instructions

Create a transaction group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • The async handler function that executes the tool logic: sends a POST request to the Lunchmoney API /transactions/group endpoint with the provided input to create a transaction group.
    async ({ input }) => {
        const { baseUrl, lunchmoneyApiToken } = getConfig();
    
        const response = await fetch(`${baseUrl}/transactions/group`, {
            method: "POST",
            headers: {
                Authorization: `Bearer ${lunchmoneyApiToken}`,
                "Content-Type": "application/json",
            },
            body: JSON.stringify(input),
        });
    
        if (!response.ok) {
            return {
                content: [
                    {
                        type: "text",
                        text: `Failed to create transaction group: ${response.statusText}`,
                    },
                ],
            };
        }
    
        const result = await response.json();
    
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(result),
                },
            ],
        };
    }
  • Zod input schema defining parameters for the create_transaction_group tool: required date, payee, transaction_ids; optional category_id, notes, tags.
    input: z.object({
        date: z.string().describe("Date in YYYY-MM-DD format"),
        payee: z.string().describe("Payee name for the group"),
        category_id: z
            .number()
            .optional()
            .describe("Category ID for the group"),
        notes: z.string().optional().describe("Notes for the group"),
        tags: z
            .array(z.number())
            .optional()
            .describe("Array of tag IDs for the group"),
        transaction_ids: z
            .array(z.number())
            .describe("Array of transaction IDs to group"),
    }),
  • Registration of the create_transaction_group tool via server.tool() within the registerTransactionTools function, specifying name, description, input schema, and inline handler.
    server.tool(
        "create_transaction_group",
        "Create a transaction group",
        {
            input: z.object({
                date: z.string().describe("Date in YYYY-MM-DD format"),
                payee: z.string().describe("Payee name for the group"),
                category_id: z
                    .number()
                    .optional()
                    .describe("Category ID for the group"),
                notes: z.string().optional().describe("Notes for the group"),
                tags: z
                    .array(z.number())
                    .optional()
                    .describe("Array of tag IDs for the group"),
                transaction_ids: z
                    .array(z.number())
                    .describe("Array of transaction IDs to group"),
            }),
        },
        async ({ input }) => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
    
            const response = await fetch(`${baseUrl}/transactions/group`, {
                method: "POST",
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                    "Content-Type": "application/json",
                },
                body: JSON.stringify(input),
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to create transaction group: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const result = await response.json();
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(result),
                    },
                ],
            };
        }
    );
Behavior1/5

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

No annotations are provided, so the description must fully disclose behavioral traits. It only states 'Create a transaction group', which implies a write/mutation operation but reveals nothing about permissions, side effects, error conditions, rate limits, or what happens to the referenced transaction IDs. For a tool with complex nested parameters and no annotations, this is critically insufficient.

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 at just three words, with no wasted language. It is front-loaded and gets straight to the point, though this brevity comes at the cost of completeness. Every word earns its place by stating the core action, even if inadequately.

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

Completeness1/5

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

Given the complexity (1 top-level parameter with 6 nested properties, no annotations, no output schema), the description is completely inadequate. It doesn't explain what a transaction group is, how creation works, what the tool returns, or any behavioral context. For a mutation tool with rich input structure and sibling interactions, this fails to provide necessary context for effective use.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 6 nested parameters have descriptions in the schema. The tool description adds no information about parameters, failing to explain what 'input' contains, the meaning of required fields like 'transaction_ids', or how parameters interact. With 0% coverage and no compensation in the description, this leaves all parameters semantically undefined.

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

Purpose2/5

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

The description 'Create a transaction group' is a tautology that merely restates the tool name without adding meaningful context. It doesn't specify what a 'transaction group' is, what resources it affects, or how it differs from sibling tools like 'create_transactions' or 'get_transaction_group'. The purpose is stated but lacks specificity and differentiation.

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

Usage Guidelines1/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. There are multiple sibling tools for creating, updating, and deleting transactions and groups (e.g., 'create_transactions', 'update_transaction', 'delete_transaction_group'), but the description offers no context about prerequisites, appropriate scenarios, or exclusions. This leaves the agent guessing about proper application.

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