Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

create_tag

Create a new tag for categorizing transactions by assigning a name and optional details like color or description.

Instructions

Create a new tag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the tag. 1-100 characters.
descriptionNoOptional description. Up to 200 characters.
text_colorNoOptional text color of the tag.
background_colorNoOptional background color of the tag.
archivedNoIf true, the tag is created archived.

Implementation Reference

  • The async handler function for the 'create_tag' tool. It builds a request body from the input parameters (name, description, text_color, background_color, archived), normalizes color values, sends a POST request to /tags, and returns the API response.
        async ({
            name,
            description,
            text_color,
            background_color,
            archived,
        }) => {
            try {
                const requestBody: Record<string, unknown> = { 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.post("/tags", requestBody);
    
                if (!response.ok) {
                    return handleApiError(response, "Failed to create tag");
                }
    
                return dataResponse(await response.json());
            } catch (error) {
                return catchError(error, "Failed to create tag");
            }
        },
    );
  • Input schema for 'create_tag' using Zod validations: name (string, 1-100 chars, required), description (string, max 200, optional), text_color (optional string), background_color (optional string), archived (optional boolean).
    inputSchema: {
        name: z
            .string()
            .min(1)
            .max(100)
            .describe("Name of the tag. 1-100 characters."),
        description: z
            .string()
            .max(200)
            .optional()
            .describe("Optional description. Up to 200 characters."),
        text_color: z
            .string()
            .optional()
            .describe("Optional text color of the tag."),
        background_color: z
            .string()
            .optional()
            .describe("Optional background color of the tag."),
        archived: z
            .boolean()
            .optional()
            .describe("If true, the tag is created archived."),
    },
  • Registration of the 'create_tag' tool via server.registerTool with its name, description, annotations (idempotentHint: false), and inputSchema.
    server.registerTool(
        "create_tag",
        {
            description: "Create a new tag.",
            inputSchema: {
                name: z
                    .string()
                    .min(1)
                    .max(100)
                    .describe("Name of the tag. 1-100 characters."),
                description: z
                    .string()
                    .max(200)
                    .optional()
                    .describe("Optional description. Up to 200 characters."),
                text_color: z
                    .string()
                    .optional()
                    .describe("Optional text color of the tag."),
                background_color: z
                    .string()
                    .optional()
                    .describe("Optional background color of the tag."),
                archived: z
                    .boolean()
                    .optional()
                    .describe("If true, the tag is created archived."),
            },
            annotations: {
                idempotentHint: false,
            },
        },
  • The normalizeColor helper function used by the 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;
    }
Behavior2/5

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

Annotations only provide idempotentHint: false. The description does not disclose behavioral details such as whether duplicate names are allowed, whether the created tag is returned, or auth/permissions needed. For a create operation, more transparency is needed.

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?

Single sentence with no unnecessary words. However, it could be slightly improved by including more context without becoming verbose.

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 creates a new resource, the description lacks crucial context such as return value, side effects (e.g., duplicate behavior), and interaction with other tags. Despite schema coverage, the description is too minimal for an agent to fully understand the tool's behavior.

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?

Schema description coverage is 100% with detailed descriptions for all five parameters. The description adds no extra meaning beyond what the schema provides. Baseline of 3 is appropriate.

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 'Create a new tag' uses a specific verb and resource, clearly indicating the tool's action. Among sibling tools like update_tag, delete_tag, and get_all_tags, it is unambiguous.

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 update_tag or delete_tag. No mention of prerequisites, such as whether all fields are required or if the tag name must be unique. Lacks usage context.

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