Skip to main content
Glama

get_tag

Retrieve detailed properties of a specific tag, including its name, color, and usage count, by providing its unique identifier.

Instructions

Get details for a specific tag. Use this to inspect a tag's properties. Read-only.

Args:
    tag_id: The tag's UUID (from list_tags).

Returns: JSON with tag id, name, color, and usage count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tag_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'get_tag'. Registered via @mcp.tool() decorator. Takes a tag_id, calls the client's get_tag method, and returns JSON with tag details.
    @mcp.tool()
    async def get_tag(ctx: Context, tag_id: str) -> str:
        """Get details for a specific tag. Use this to inspect a tag's properties. Read-only.
    
        Args:
            tag_id: The tag's UUID (from list_tags).
    
        Returns: JSON with tag id, name, color, and usage count.
        """
        try:
            result = await _client(ctx).get_tag(tag_id)
            return json.dumps(result, default=str)
        except httpx.HTTPStatusError as e:
            return json.dumps({"error": f"Immich API error: {e.response.status_code}", "detail": e.response.text[:200]})
  • Helper method on ImmichClient that makes the actual HTTP GET request to /tags/{tag_id} to fetch tag details from the Immich API.
    async def get_tag(self, tag_id: str) -> dict:
        """Get tag details."""
        return await self._request("GET", f"/tags/{tag_id}")
  • Registration of 'get_tag' as an MCP tool via the @mcp.tool() decorator on the FastMCP instance.
    @mcp.tool()
Behavior4/5

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

The description discloses the tool is 'Read-only,' a key behavioral trait. It also outlines the return structure, though it could mention that tag_id is required and must be valid.

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 concise with three lines covering purpose, usage, and return value. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the tool's simplicity (one parameter, output schema present), the description fully covers what the tool does, how to use the parameter, and what is returned.

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?

With 0% schema description coverage, the description compensates by explaining that tag_id is 'The tag's UUID (from list_tags),' guiding the agent on how to obtain the ID.

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 clearly states 'Get details for a specific tag,' specifying the precise verb and resource. This distinguishes it from sibling tools like list_tags (list all tags) and create_tag.

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

Usage Guidelines4/5

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

The description advises 'Use this to inspect a tag's properties. Read-only,' clearly indicating the tool's context. It does not explicitly exclude other tools, but the purpose is clear enough for appropriate selection.

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/drolosoft/immich-photo-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server