Open Context Mode Index
Store local content in the FTS5 knowledge base so open_ctx_search can retrieve focused
snippets later.
Instructions
- Prefer the
open_ctx_indexMCP tool when it is available. - Ask for a path only when the user gave none and the project root is ambiguous.
- Pass
path, never a large inlinecontent. The bytes stay in the sandbox; the conversation never carries them. - Give the source a descriptive label — that label is what
open_ctx_searchfilters on.project:<dir>is the CLI default for directories.
open_ctx_index({
path: ".",
source: "project:my-app",
maxDepth: 5,
maxFiles: 200,
exclude: ["node_modules", "dist", ".git", "coverage"]
})
- Fall back to the CLI when MCP tools are unavailable:
open-context-mode index . --source project:my-app --exclude node_modules --exclude dist
- Report the source label, the file/section count, and the matching search call:
open_ctx_search({ source: "project:my-app", queries: ["..."] })
Bounds
- Leave
node_modules, build output,.git, secrets and generated artifacts out. - For broad repos, confirm with the user before raising
maxFilespast 500.
