add_folder
Register a local folder to make its documents searchable. Indexes supported files in the background, with optional include/exclude globs.
Instructions
Register a local folder so its documents become searchable.
Use this once per folder before searching it. Indexing runs in the
background — this returns immediately with the file count found; call
index_status to track progress (the first ever index also downloads
the embedding model, ~130 MB). path must be an absolute path to an
existing directory. Optional globs match paths relative to the folder
using forward slashes (e.g. include_globs=["docs/**/.md"],
exclude_globs=["drafts/"]); omit both to index every supported file.
Supported types: txt, md, pdf, docx, html.
Returns {ok, folder, files_found, status: "indexing"}. files_found counts supported files matching the globs; unsupported files are silently ignored. Searches issued while indexing runs work on the portion indexed so far.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| exclude_globs | No | ||
| include_globs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||