MCP server · App Intents · CLI
Mọi tính năng đều có thể được trợ lý AI gọi. Tất cả chạy cục bộ trên Mac — AI gửi yêu cầu, TwinSweep làm việc, TwinSweep không tải lên thứ gì.
Mở TwinSweep → Cài đặt → AI → Kết nối. Khởi động lại app AI.
Cài đặt → AI → Chép lệnh, rồi dán vào Terminal.
Các tác vụ xuất hiện trong app Shortcuts, mục TwinSweep.
Cấu hình MCP thủ công:
{
"mcpServers": {
"twinsweep": {
"command": "/Applications/TwinSweep.app/Contents/MacOS/twinsweep",
"args": ["mcp"]
}
}
}
Tên và mô tả công cụ được giữ nguyên tiếng Anh — đúng như những gì trợ lý AI của bạn nhận được.
| Công cụ | Chức năng | Thay đổi file? |
|---|---|---|
find_duplicates | Scan folders for identical files and (optionally) near-duplicate photos. Changes nothing. Returns a scan_id, space that can be freed (by kind), and each group with the copy to keep and why. Skips system/app-data folders, app bundles, photo libraries, code projects, hidden files, symlinks and iCloud files not downloaded. | Không |
get_scan | Show all groups of a previous scan ("latest" or a scan_id). Read-only. | Không |
trash_duplicates | Move extra copies from a scan to the Trash. By default only identical copies; similar photos only with include_similar or when their groups are listed. At least one copy per group is always kept. Each file is re-checked first; network drives are never touched. Undo with undo. Ask the user before calling. | Có |
list_cleanups | Past cleanups (newest first) with how many files and whether they were undone. Read-only. | Không |
undo | Put files from a cleanup back from the Trash to their original folders (default: the most recent cleanup; or give cleanup_id from list_cleanups). Never overwrites a file that now exists at the original path. | Có |
undo_last | Same as undo with no cleanup_id. | Có |
find_photo_duplicates | Find identical and near-duplicate photos in the Apple Photos library (optionally one year or the last N days). Changes nothing. Uses the TwinSweep app (it asks for Photos access the first time). Returns a scan_id and groups with the photo to keep (favorites first, then highest resolution). | Không |
album_photo_duplicates | Put the extra photos from a photo scan into the album "TwinSweep – Duplicates" so the user can review and delete them in Photos. Never deletes anything. | Có |
delete_photo_duplicates | Delete the extra copies from a photo scan the standard Photos way: macOS shows its own confirmation, and photos go to Recently Deleted for 30 days (recoverable). By default only identical groups; similar groups only with include_similar or when listed. Favorites are never deleted. Ask the user first. | Có |
twinsweep list twinsweep find_duplicates --folders ~/Downloads --similar_images true