Skip to main content
Glama

get_duplicates

Fetch ML-detected duplicate photo groups to review and resolve duplicates in your Immich library. Read-only operation.

Instructions

Get all ML-detected duplicate asset groups. Use this to review potential duplicates before resolving them with resolve_duplicates. Requires Immich ML service. Read-only.

Returns: JSON array of duplicate groups (each with duplicateId, assets array, and similarity scores).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for get_duplicates. Calls the client method and returns JSON-serialized duplicate groups.
    @mcp.tool()
    async def get_duplicates(ctx: Context) -> str:
        """Get all ML-detected duplicate asset groups. Use this to review potential duplicates
        before resolving them with resolve_duplicates. Requires Immich ML service. Read-only.
    
        Returns: JSON array of duplicate groups (each with duplicateId, assets array, and similarity scores).
        """
        result = await _client(ctx).get_duplicates()
        return json.dumps(result, default=str)
  • Client helper method that makes the actual HTTP GET request to the Immich /duplicates API endpoint.
    async def get_duplicates(self) -> list[dict]:
        """Get all detected duplicate groups."""
        return await self._request("GET", "/duplicates")
Behavior4/5

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

The description labels the operation as read-only and notes the ML service dependency. Since no annotations are present, this covers essential behavioral traits without contradictions.

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?

Three sentences, each serving a purpose: stating the action, providing usage context, and explaining the return format. No wasted words.

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 zero parameters and an existing output schema, the description fully covers the tool's purpose and output structure, leaving 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?

With zero parameters, the description adds value by detailing the return structure (JSON array with duplicateId, assets, similarity scores), going beyond the empty schema.

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 explicitly states it gets ML-detected duplicate asset groups, distinguishing it from sibling tools like resolve_duplicates by noting it is for review.

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?

It specifies to use this before resolving duplicates with resolve_duplicates and mentions the Immich ML service requirement, providing clear context but no explicit exclusions.

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