Skip to main content
Glama

update_tag

Update a tag's name or color, propagating changes to all assets using that tag.

Instructions

Update a tag's name or color. Side effect: changes apply to all assets using this tag.

Args:
    tag_id: The tag's UUID.
    name: New tag name. Omit to keep current.
    color: New hex color (e.g. '#FF5733'). Omit to keep current.

Returns: JSON with the updated tag object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tag_idYes
nameNo
colorNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler for 'update_tag'. Decorated with @mcp.tool(), it accepts tag_id, name, and color parameters, builds a fields dict, calls the client's update_tag method, and returns JSON.
    @mcp.tool()
    async def update_tag(ctx: Context, tag_id: str, name: str | None = None, color: str | None = None) -> str:
        """Update a tag's name or color. Side effect: changes apply to all assets using this tag.
    
        Args:
            tag_id: The tag's UUID.
            name: New tag name. Omit to keep current.
            color: New hex color (e.g. '#FF5733'). Omit to keep current.
    
        Returns: JSON with the updated tag object.
        """
        fields: dict = {}
        if name is not None:
            fields["name"] = name
        if color is not None:
            fields["color"] = color
        if not fields:
            return json.dumps({"error": "No fields to update. Provide name or color."})
        try:
            result = await _client(ctx).update_tag(tag_id, **fields)
            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]})
  • The ImmichClient.update_tag helper method that sends a PUT request to /tags/{tag_id} with the provided fields to update the tag on the Immich server.
    async def update_tag(self, tag_id: str, **fields) -> dict:
        """Update a tag (name, color)."""
        return await self._request("PUT", f"/tags/{tag_id}", json=fields)
  • The @mcp.tool() decorator registers 'update_tag' as an MCP tool in the FastMCP server instance.
    @mcp.tool()
Behavior4/5

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

Discloses side effect 'changes apply to all assets using this tag' and optional parameters. No annotations provided, so description bears burden; it reasonably covers mutation behavior.

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?

Very concise: two-sentence summary followed by parameter list. 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?

With low complexity (3 params), no annotations, and existing output schema, the description sufficiently covers purpose, side effects, and parameter meaning. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 0% description coverage; description compensates fully by explaining tag_id as UUID, name as optional new name, and color as hex format with 'Omit to keep current'.

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?

Description clearly states 'Update a tag's name or color' with a specific verb and resource. The side effect mentions global application, distinguishing it from 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 Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance. The description implies modification context but lacks direct comparison to sibling tools like create_tag or delete_tag.

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