import_from_camera
Detects a physically connected camera or memory card and copies all photos to a local directory, returning the destination path. Organizes files by camera folder and avoids overwriting existing files.
Instructions
Use when a camera or memory card is physically connected. Detects the camera via libgphoto2 and copies all photos to a local directory, then returns the destination path. Copying alone does not put the photos in the library: follow up with import_batch on that destination path to register them as a film roll. Files are written one subdirectory per camera folder or card, prefixed with the camera's identity (e.g. /Nikon_D850_sn_30014567_store_00010001_DCIM_100NCD80/DSC_0001.NEF), because camera filenames repeat across folders, across the two cards of a dual-slot body, and across bodies importing into the same destination. Import the destination recursively. A file that would collide with a different photo already on disk is kept alongside it as -2., never overwritten. This holds for two bodies of the same model that report no serial number and therefore share a subdirectory: before skipping files a destination appears to already hold, such a camera is asked for a small sample of them and the bytes are compared, so a second body's photos are kept rather than dropped. Re-running is cheap: a body with a serial number transfers nothing it already delivered. Any file the card lists that does not reach the destination is reported by name. Cost: this tool runs to completion synchronously and does not return early. A full card can take many minutes, up to the 1 hour default timeout, which is longer than most MCP clients wait for a single request. Progress is observable while it runs by tailing the .import.log file in the destination directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| camera_port | No | gphoto2 port string (e.g. 'usb:002,002'). Required when multiple cameras are connected. | |
| destination | No | Target directory for copied files. Default: ~/Pictures/import-YYYY-MM-DD/ | |
| timeout_seconds | No | Overall time budget for the transfer from one camera, shared across all of its folders (not per folder). Default: 3600 (1 hour). On timeout, re-run the tool to resume — already-copied files are skipped. |