Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_transaction_group

Retrieve detailed information about a specific transaction group in LunchMoney by providing the transaction group ID to access financial data.

Instructions

Get details of a transaction group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • Registration of the 'get_transaction_group' tool using server.tool(), including schema definition and handler implementation. Fetches transaction group details from LunchMoney API endpoint /transactions/group/{id}.
    server.tool(
        "get_transaction_group",
        "Get details of a transaction group",
        {
            input: z.object({
                transaction_id: z
                    .number()
                    .describe("ID of the transaction group"),
            }),
        },
        async ({ input }) => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
    
            const response = await fetch(
                `${baseUrl}/transactions/group/${input.transaction_id}`,
                {
                    headers: {
                        Authorization: `Bearer ${lunchmoneyApiToken}`,
                    },
                }
            );
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get transaction group: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const result = await response.json();
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(result),
                    },
                ],
            };
        }
    );
  • Handler function that makes an authenticated GET request to the LunchMoney API to retrieve details of a specific transaction group by ID and returns the JSON result.
        async ({ input }) => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
    
            const response = await fetch(
                `${baseUrl}/transactions/group/${input.transaction_id}`,
                {
                    headers: {
                        Authorization: `Bearer ${lunchmoneyApiToken}`,
                    },
                }
            );
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get transaction group: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const result = await response.json();
    
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(result),
                    },
                ],
            };
        }
    );
  • Zod input schema requiring a numeric transaction_id for the transaction group.
    input: z.object({
        transaction_id: z
            .number()
            .describe("ID of the transaction group"),
    }),
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. It implies a read operation ('Get'), but doesn't disclose behavioral traits such as permissions needed, error handling, rate limits, or what happens if the transaction_id doesn't exist. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

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?

Given the tool's complexity (1 parameter, no output schema, no annotations), the description is incomplete. It doesn't explain what 'details' include, how results are structured, or address potential errors. For a read operation in a financial context, more context on return values and usage is needed.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'transaction group' but doesn't explain the 'transaction_id' parameter beyond what the schema minimally indicates (type: number). No details on format, constraints, or examples are provided, failing to add meaningful semantics.

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

Purpose3/5

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

The description 'Get details of a transaction group' clearly states the verb ('Get') and resource ('transaction group'), but it's vague about what 'details' entail and doesn't differentiate from sibling tools like 'get_single_transaction' or 'get_transactions'. It avoids tautology by not just restating the name, but lacks specificity.

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 'get_single_transaction' and 'get_transactions', it's unclear if this is for grouped transactions or a different scope. No explicit when/when-not statements or prerequisites are mentioned.

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