library

scan_directory

Scan a folder of photos into the imagic library.

What it does

Use this first, before any culling, editing, or exporting: nothing else works on photos that have not been ingested. Give an absolute path to a folder of RAW or JPEG/PNG/TIFF files. Subfolders are included. Re-scanning is safe; already-known files are skipped. Pass the path exactly as the user gave it, whole and unedited. Folder names often contain spaces and " - " (for example "Holland 2025 - people-free"); never split or shorten a path at a dash. Everything inside the folder is imported, so if the folder does not exist the tool errors with the nearest matches, and if a similarly named folder sits beside it (or inside it) the tool refuses and lists them: ask the user which one they mean. Set confirm_exact_path=true only when the user has confirmed that exact folder is the one they want. Returns counts of discovered, newly ingested, and skipped files. On a remote connection this can take minutes on a big card: past a short budget it returns {"status": "running", "job_id": ...} instead, call get_job_status with that job_id to keep checking and get the same result shown above once it is ready. Local clients always get the result directly.

Parameters

NameTypeRequired
path str required
confirm_exact_path bool optional

Asking for it

You do not call this by name. You say what you want, and the agent picks the tool:

Cull the wedding shoot in D:/Shoots/eva_tom, keep the best frames, and tell me what you dropped.

The rest of the library tools

get_library_stats list_photos get_photo get_preview_url get_job_status

Workflows that use it

Where it runs

On your machine. imagic's MCP server is a local process that your AI client starts; the photos never leave your disk and nothing is uploaded. That is true of every tool in the reference, including this one.

To call it you need an MCP client connected to imagic. Setup takes about three minutes for Claude Code, Cursor, VS Code, Codex, Gemini CLI and ten others.

Give your AI the whole pipeline

scan_directory is one of 30 tools in imagic Max. The free 500-export trial includes all of them.