Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_user

Retrieve current user account details from LunchMoney to access personal finance information and manage financial data.

Instructions

Get details on the current user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline async handler function for the 'get_user' MCP tool. It fetches the current user's profile from the Lunchmoney API endpoint '/me' using the configured API token and returns the User object as a JSON string in the tool response content.
        server.tool("get_user", "Get details on the current user", {}, async () => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
            const response = await fetch(`${baseUrl}/me`, {
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                },
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get user details: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const user: User = await response.json();
            
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(user),
                    },
                ],
            };
        });
    }
  • TypeScript interface defining the structure of the User object, which is fetched and returned by the get_user tool handler.
    export interface User {
        user_id: number;
        user_name: string;
        user_email: string;
        account_id: number;
        budget_name: string;
        primary_currency: string;
        api_key_label: string | null;
    }
  • src/tools/user.ts:5-36 (registration)
    The registerUserTools function that registers the 'get_user' tool on the MCP server instance.
    export function registerUserTools(server: McpServer) {
        server.tool("get_user", "Get details on the current user", {}, async () => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
            const response = await fetch(`${baseUrl}/me`, {
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                },
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get user details: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const user: User = await response.json();
            
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(user),
                    },
                ],
            };
        });
    }
  • src/index.ts:23-23 (registration)
    Invocation of registerUserTools in the main server setup to register the get_user tool.
    registerUserTools(server);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Get details' but doesn't specify what details are returned, whether authentication is required, or any rate limits. This is a significant gap 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 a single, clear sentence with no wasted words. It's front-loaded and efficiently conveys the core purpose 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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'details' are returned or any behavioral aspects like authentication needs, making it insufficient for an agent to fully understand the tool's operation.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for this dimension.

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 verb ('Get') and resource ('details on the current user'), making the purpose understandable. However, it doesn't distinguish this tool from potential sibling tools that might also retrieve user information, though none are explicitly listed among the siblings.

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 doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage based on the tool name alone.

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