Skip to main content
Glama
akutishevsky

LunchMoney MCP Server

get_single_tag

Read-only

Retrieve detailed information for a specific tag using its ID. First obtain tag IDs from get_all_tags.

Instructions

Get details of a single tag by ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagIdYesId of the tag to query. Call get_all_tags first to discover ids.

Implementation Reference

  • The tool handler function for 'get_single_tag'. It takes a tagId, makes a GET request to /tags/{tagId}, and returns the response data.
    async ({ tagId }) => {
        try {
            const response = await api.get(`/tags/${tagId}`);
    
            if (!response.ok) {
                return handleApiError(response, "Failed to get tag");
            }
    
            return dataResponse(await response.json());
        } catch (error) {
            return catchError(error, "Failed to get tag");
        }
    },
  • Input schema for 'get_single_tag' defining the 'tagId' parameter as a coerced number with a description.
    {
        description: "Get details of a single tag by ID.",
        inputSchema: {
            tagId: z.coerce
                .number()
                .describe(
                    "Id of the tag to query. Call get_all_tags first to discover ids.",
                ),
        },
        annotations: {
            readOnlyHint: true,
        },
  • Registration of 'get_single_tag' tool via server.registerTool() with name 'get_single_tag'.
    server.registerTool(
        "get_single_tag",
        {
            description: "Get details of a single tag by ID.",
            inputSchema: {
                tagId: z.coerce
                    .number()
                    .describe(
                        "Id of the tag to query. Call get_all_tags first to discover ids.",
                    ),
            },
            annotations: {
                readOnlyHint: true,
            },
        },
        async ({ tagId }) => {
            try {
                const response = await api.get(`/tags/${tagId}`);
    
                if (!response.ok) {
                    return handleApiError(response, "Failed to get tag");
                }
    
                return dataResponse(await response.json());
            } catch (error) {
                return catchError(error, "Failed to get tag");
            }
        },
    );
  • src/index.ts:27-27 (registration)
    Call to registerTagTools(server) in the main entry point, which registers all tag tools including 'get_single_tag'.
    registerTagTools(server);
  • API call to GET /tags/{tagId} made via the api helper object defined in src/api.ts.
    const response = await api.get(`/tags/${tagId}`);
    
    if (!response.ok) {
        return handleApiError(response, "Failed to get tag");
Behavior3/5

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

Annotations already declare readOnlyHint=true, indicating a safe read. The description confirms this with 'Get details', but adds no additional behavioral context beyond what annotations provide.

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 sentence of 6 words, front-loaded with the key action and resource. Every word is necessary, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter retrieval with no output schema, the description is sufficient. It clearly states the purpose and the parameter description provides ID discovery guidance. Could be slightly more specific about what 'details' includes, but adequate.

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%, and the parameter description for tagId adds useful guidance ('Call get_all_tags first'), so baseline 3 is appropriate. The main description does not further elaborate on parameters.

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 uses a specific verb 'Get details' and identifies the resource as 'single tag by ID', clearly distinguishing it from siblings like get_all_tags and update_tag.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The main description does not provide explicit when-to-use guidance or alternatives, but the parameter description suggests calling get_all_tags first, which implies usage context. However, no exclusions are given.

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