mesh_remember_directory
Recursively ingest local directory files into the mesh's shared memory (mcl-rag) as documents, updating existing entries on re-run. Ideal for corpora, not conversational snippets.
Instructions
Recursively ingest every matching file under a LOCAL directory into the mesh's shared memory (mcl-rag), one mcl-rag/upload_knowledge call per file -- for real documents (a corpus, a set of notes), not conversational snippets (use mesh_remember for those). Each file's content travels in its own mesh call, so this works regardless of where mcl-rag is physically running -- it does NOT ask mcl-rag to read from its own filesystem (mcl-rag's seed_corpus does that, and isn't reachable over the mesh at all). document_id is derived deterministically from each file's relative path, so re-running this on the same directory updates existing documents instead of duplicating them. Binary or undecodable files are skipped, not treated as errors. Processes files sequentially, one mesh call at a time -- a large directory will take a while; the response is a summary (counts + any per-file failures), not a per-file log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| directory | Yes | Local directory to walk, recursively. Must exist and be readable. | |
| exclude_dirs | No | Directory names to skip anywhere in the tree. Defaults to [".git","node_modules","_build","_build_resolved","_checkouts","dist","target",".next","vendor"]. | |
| source_prefix | No | Prepended to each file's relative path for source_path, e.g. "hecate-corpus". | |
| include_extensions | No | File extensions to ingest, e.g. [".md", ".ts"]. Defaults to [".md",".mdx",".txt"]. |