Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_all_crypto

Retrieve all cryptocurrency assets from your LunchMoney account to view your complete crypto portfolio holdings and track digital asset investments.

Instructions

Get a list of all cryptocurrency assets associated with the user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that fetches the user's cryptocurrency assets from the LunchMoney API endpoint `/crypto`, handles errors, and returns the assets as a JSON string in the MCP response format.
    async () => {
        const { baseUrl, lunchmoneyApiToken } = getConfig();
        
        const response = await fetch(`${baseUrl}/crypto`, {
            headers: {
                Authorization: `Bearer ${lunchmoneyApiToken}`,
            },
        });
    
        if (!response.ok) {
            return {
                content: [
                    {
                        type: "text",
                        text: `Failed to get crypto assets: ${response.statusText}`,
                    },
                ],
            };
        }
    
        const data = await response.json();
        const cryptoAssets: Crypto[] = data.crypto;
        
        return {
            content: [
                {
                    type: "text",
                    text: JSON.stringify(cryptoAssets),
                },
            ],
        };
    }
  • Registers the 'get_all_crypto' tool on the MCP server with its description, empty input schema, and inline handler function.
        "get_all_crypto",
        "Get a list of all cryptocurrency assets associated with the user",
        {},
        async () => {
            const { baseUrl, lunchmoneyApiToken } = getConfig();
            
            const response = await fetch(`${baseUrl}/crypto`, {
                headers: {
                    Authorization: `Bearer ${lunchmoneyApiToken}`,
                },
            });
    
            if (!response.ok) {
                return {
                    content: [
                        {
                            type: "text",
                            text: `Failed to get crypto assets: ${response.statusText}`,
                        },
                    ],
                };
            }
    
            const data = await response.json();
            const cryptoAssets: Crypto[] = data.crypto;
            
            return {
                content: [
                    {
                        type: "text",
                        text: JSON.stringify(cryptoAssets),
                    },
                ],
            };
        }
    );
  • src/index.ts:31-31 (registration)
    Invokes the registration of crypto tools, including 'get_all_crypto', on the main MCP server instance.
    registerCryptoTools(server);
  • Helper function that registers both crypto-related tools on the MCP server.
    export function registerCryptoTools(server: McpServer) {
        server.tool(
            "get_all_crypto",
            "Get a list of all cryptocurrency assets associated with the user",
            {},
            async () => {
                const { baseUrl, lunchmoneyApiToken } = getConfig();
                
                const response = await fetch(`${baseUrl}/crypto`, {
                    headers: {
                        Authorization: `Bearer ${lunchmoneyApiToken}`,
                    },
                });
    
                if (!response.ok) {
                    return {
                        content: [
                            {
                                type: "text",
                                text: `Failed to get crypto assets: ${response.statusText}`,
                            },
                        ],
                    };
                }
    
                const data = await response.json();
                const cryptoAssets: Crypto[] = data.crypto;
                
                return {
                    content: [
                        {
                            type: "text",
                            text: JSON.stringify(cryptoAssets),
                        },
                    ],
                };
            }
        );
    
        server.tool(
            "update_manual_crypto",
            "Update a manually-managed cryptocurrency asset balance",
            {
                input: z.object({
                    crypto_id: z
                        .number()
                        .describe("ID of the crypto asset to update"),
                    balance: z
                        .number()
                        .optional()
                        .describe("Updated balance of the crypto asset"),
                }),
            },
            async ({ input }) => {
                const { baseUrl, lunchmoneyApiToken } = getConfig();
                
                const body: any = {};
                
                if (input.balance !== undefined) {
                    body.balance = input.balance.toString();
                }
                
                const response = await fetch(`${baseUrl}/crypto/manual/${input.crypto_id}`, {
                    method: "PUT",
                    headers: {
                        Authorization: `Bearer ${lunchmoneyApiToken}`,
                        "Content-Type": "application/json",
                    },
                    body: JSON.stringify(body),
                });
    
                if (!response.ok) {
                    return {
                        content: [
                            {
                                type: "text",
                                text: `Failed to update crypto asset: ${response.statusText}`,
                            },
                        ],
                    };
                }
    
                const result = await response.json();
                
                return {
                    content: [
                        {
                            type: "text",
                            text: JSON.stringify(result),
                        },
                    ],
                };
            }
        );
    }
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 for behavioral disclosure. While 'Get a list' implies a read operation, it doesn't specify whether this requires authentication, returns paginated results, includes metadata like timestamps or balances, or has any rate limits. The description is too minimal for a tool with no annotation support.

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 that directly states the tool's purpose without any wasted words. It's appropriately sized for a simple listing tool and front-loads the essential information.

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 insufficiently complete. For a tool that presumably returns cryptocurrency data, it should at least hint at the response structure (e.g., list of assets with names/balances) or behavioral constraints. The current description leaves too much undefined for practical agent use.

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 zero parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description doesn't need to compensate for any parameter gaps, earning a baseline score of 4 for not introducing confusion about non-existent parameters.

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 ('list of all cryptocurrency assets associated with the user'), making the purpose immediately understandable. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_all_assets' or 'get_all_categories', which follow a similar pattern for different resource types.

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 sibling tools like 'get_all_assets' (likely broader) and 'get_single_transaction' (more specific), there's no indication of when this cryptocurrency-specific listing is preferred or what prerequisites might exist.

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