Skip to main content
Glama

Resolve duplicates

resolve_duplicates
Destructive

Resolve duplicate photo groups by selecting which assets to keep and which to move to trash, so you can clean up your Immich library after reviewing duplicates.

Instructions

Resolve duplicate groups by choosing which assets to keep and which to trash. Use this after reviewing results from get_duplicates. Trashed assets can still be recovered via restore_assets. Side effect: moves rejected duplicates to trash.

Args:
    groups: List of dicts, each with: duplicateId (from get_duplicates), assetIds (UUIDs to KEEP), trashIds (UUIDs to TRASH).

Returns: JSON with count of resolved groups.

Input Schema

NameRequiredDescriptionDefault
groupsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description isn't burdened with establishing the mutation. It still adds real value beyond them: it names the side effect precisely ('moves rejected duplicates to trash'), discloses recoverability via restore_assets, and states the return value. It doesn't mention permissions, batch size limits, or partial-failure behavior for a multi-group call.

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?

Front-loaded with the action and side effect, then a usage pointer, then Args and Returns blocks. Every sentence carries information; there is no restatement of the tool name or filler.

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?

Although an output schema exists (making the 'Returns' line mildly redundant), the description is complete for this complexity: it covers the preconditions, the side effect and its reversibility, and the nested structure of the sole parameter. An agent could call it correctly from this text alone.

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?

Schema coverage is 0% and the schema only declares an untyped array of open objects, so the description carries the entire burden. It documents the three keys inside each dict (duplicateId, assetIds to KEEP, trashIds to TRASH) and where duplicateId comes from — without this text the parameter would be unusable.

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?

States a specific verb and resource ('Resolve duplicate groups') plus the decision the caller must make (keep vs. trash). It is clearly distinguishable from the sibling get_duplicates, which only lists candidates, and from delete_assets, which has no duplicate-grouping concept.

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?

Gives explicit sequencing: 'Use this after reviewing results from get_duplicates', and points at restore_assets as the recovery path. It doesn't state when NOT to use it (e.g., when only one asset per group matters, or why not call delete_assets directly), so it falls short of a full when/when-not treatment.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools