kb_import_file
Copy a file or folder from allowed Mac locations into the knowledge base so text-bearing documents become searchable while other media are stored and indexed; duplicate content is skipped.
Instructions
Copy a file or a whole folder from this Mac into the knowledge base.
Allowed sources: ~/Downloads, ~/Desktop, ~/Documents, ~/Claude, iCloud
Drive, plus folders listed in KB_IMPORT_DIRS. Text-bearing files (PDF,
Word, PPT, EPUB, Markdown ...) are searchable immediately; other files
(images, video) are stored and listed in INDEX.md. Files whose exact
content is already on the drive are skipped (skipped_duplicates).
:param source_path: Absolute path, e.g. "~/Downloads/报告.pdf" or a folder. :param category: Target folder on the drive (default "_Inbox"). :param new_name: Optional new name (a file's extension is kept if omitted). :param move: Delete the source after a successful copy (default: keep it). :param allow_duplicate: Import even if identical content already exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| move | No | ||
| category | No | _Inbox | |
| new_name | No | ||
| source_path | Yes | ||
| allow_duplicate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |