Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

update_tag

Idempotent

Update the name, description, colors, or archive status of an existing tag.

Instructions

Update properties for an existing tag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagIdYesId of the tag to update.
nameNo
descriptionNo
text_colorNo
background_colorNo
archivedNo

Implementation Reference

  • The handler function for the 'update_tag' tool. It accepts tagId, name, description, text_color, background_color, and archived, builds a request body, and calls PUT /tags/{tagId}.
        async ({
            tagId,
            name,
            description,
            text_color,
            background_color,
            archived,
        }) => {
            try {
                const requestBody: Record<string, unknown> = {};
                if (name !== undefined) requestBody.name = name;
                if (description !== undefined)
                    requestBody.description = description;
                if (text_color !== undefined)
                    requestBody.text_color = normalizeColor(text_color);
                if (background_color !== undefined)
                    requestBody.background_color =
                        normalizeColor(background_color);
                if (archived !== undefined) requestBody.archived = archived;
    
                const response = await api.put(`/tags/${tagId}`, requestBody);
    
                if (!response.ok) {
                    return handleApiError(response, "Failed to update tag");
                }
    
                return dataResponse(await response.json());
            } catch (error) {
                return catchError(error, "Failed to update tag");
            }
        },
    );
  • Input schema for 'update_tag' using zod. Defines tagId (required, coerced number), name, description, text_color, background_color (nullable), and archived (boolean).
    inputSchema: {
        tagId: z.coerce.number().describe("Id of the tag to update."),
        name: z.string().min(1).max(100).optional(),
        description: z.string().max(200).nullable().optional(),
        text_color: z.string().nullable().optional(),
        background_color: z.string().nullable().optional(),
        archived: z.boolean().optional(),
    },
  • Registration of 'update_tag' via server.registerTool() within the registerTagTools function, including schema, description, annotations (idempotentHint: true), and the handler.
    server.registerTool(
        "update_tag",
        {
            description: "Update properties for an existing tag.",
            inputSchema: {
                tagId: z.coerce.number().describe("Id of the tag to update."),
                name: z.string().min(1).max(100).optional(),
                description: z.string().max(200).nullable().optional(),
                text_color: z.string().nullable().optional(),
                background_color: z.string().nullable().optional(),
                archived: z.boolean().optional(),
            },
            annotations: {
                idempotentHint: true,
            },
        },
        async ({
            tagId,
            name,
            description,
            text_color,
            background_color,
            archived,
        }) => {
            try {
                const requestBody: Record<string, unknown> = {};
                if (name !== undefined) requestBody.name = name;
                if (description !== undefined)
                    requestBody.description = description;
                if (text_color !== undefined)
                    requestBody.text_color = normalizeColor(text_color);
                if (background_color !== undefined)
                    requestBody.background_color =
                        normalizeColor(background_color);
                if (archived !== undefined) requestBody.archived = archived;
    
                const response = await api.put(`/tags/${tagId}`, requestBody);
    
                if (!response.ok) {
                    return handleApiError(response, "Failed to update tag");
                }
    
                return dataResponse(await response.json());
            } catch (error) {
                return catchError(error, "Failed to update tag");
            }
        },
    );
  • src/index.ts:27-27 (registration)
    Call to registerTagTools(server) which registers all tag tools including 'update_tag'.
    registerTagTools(server);
  • Helper function normalizeColor used by the update_tag handler to strip leading '#' from color values before sending to the API.
    function normalizeColor(
        value: string | null | undefined,
    ): string | null | undefined {
        if (value === undefined || value === null) return value;
        return value.startsWith("#") ? value.slice(1) : value;
    }
Behavior3/5

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

Annotations indicate idempotentHint: true, but the description does not reference idempotency or other behavioral traits. The description simply states 'update', which is consistent with a non-destructive operation. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence. It efficiently states the purpose without wasted words, though it could be slightly more informative.

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?

With 6 parameters and no output schema, the description lacks necessary context about what properties can be updated and constraints (e.g., max length). The low schema coverage makes the description insufficient.

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?

Only 17% of parameters are described in the schema (tagId). The description does not elaborate on properties like name, description, colors, or archived, failing to compensate for low schema coverage.

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

Purpose5/5

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

The description 'Update properties for an existing tag' clearly states the action (update) and the resource (existing tag). It distinguishes from sibling tools like create_tag or delete_tag.

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?

No guidance on when to use this tool versus alternatives like create_tag or get_single_tag. The description does not mention prerequisites (e.g., tagId must exist) or context for use.

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