Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

update_manual_crypto

Update the balance of a manually-tracked cryptocurrency asset in your LunchMoney financial data to maintain accurate portfolio tracking.

Instructions

Update a manually-managed cryptocurrency asset balance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Implementation Reference

  • Handler function that updates a manual cryptocurrency asset balance by making a PUT request to the LunchMoney API endpoint `/crypto/manual/{crypto_id}` with the provided balance.
    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),
                },
            ],
        };
    }
  • Zod schema defining the input parameters: crypto_id (required number) and balance (optional number).
    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"),
    }),
  • Registration of the 'update_manual_crypto' tool using server.tool(), including name, description, schema, and handler.
    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 the full burden. It implies a mutation ('update') but doesn't disclose behavioral traits like whether it overwrites or merges balances, what permissions are required, if it's idempotent, or what happens on failure. This is inadequate for a mutation tool with zero 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 zero waste. It's front-loaded and efficiently conveys the core purpose without unnecessary details, making it easy to parse quickly.

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 complexity of a mutation tool with no annotations, no output schema, and low schema coverage, the description is incomplete. It lacks crucial details like error handling, return values, side effects, or usage context, which are essential for safe and effective tool invocation.

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 'balance' and 'crypto_id', which align with the two nested parameters in the schema. However, schema description coverage is 0%, so the schema provides no descriptions. The description adds minimal semantic context (e.g., 'updated balance'), but doesn't explain formats, constraints, or the relationship between parameters, leaving gaps.

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 'update' and the resource 'manually-managed cryptocurrency asset balance', making the purpose specific and understandable. It distinguishes from obvious siblings like 'update_asset' by specifying 'crypto' and 'manual', though it doesn't explicitly compare to all 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 like 'update_asset' or 'create_asset', nor does it mention prerequisites such as needing an existing crypto asset ID. It only states what it does, not when or why to use it.

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