You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ac7d122
Browse filesBrowse the repository at this point in the historyBrowse files
Description: "Search a codebase for files using concept-based ranked search. Faster and more relevant than grep or find for locating WHERE code lives. "+
77
+
"Query with plain keywords, concepts, partial filenames, or symbol names (e.g. \"auth login\", \"jwt token refresh\", \"payment handler\", \"createUser\"). "+
78
+
"Results are ranked by relevance score (exact basename +15 and exact symbol +24 rank highest; partial path and basename matches add +4..+7; synonym matches add +5..+8). "+
79
+
"The live index updates automatically as files change, so no separate watch or init step is required while this server is running. "+
80
+
"Set hybrid=true to enable content fallback via ripgrep when index results are sparse. "+
81
+
"Use this instead of grep when you need to find which file handles a concept — grep finds what's INSIDE files, this finds WHICH files matter. "+
82
+
"Do not use for searching file contents (use grep) or file metadata like size/date/permissions (use find).",
The server watches for file changes and keeps the index current. All communication is via stdin/stdout JSON-RPC — no network, fully local.
50
199
200
+
Pass the project's absolute path so the server targets the right project no matter what working directory the AI client launches it from. If several ctxt servers run on one project, the first becomes the writer and later ones serve read-only (live in-memory search, no snapshot writes).
returnfmt.Errorf("no index found at %s; run 'ctxt init' from the project root first", outputPath)
@@ -366,79 +519,8 @@ Setup: Add to your AI client's MCP config:
366
519
Version: currentVersion(),
367
520
}, nil)
368
521
369
-
mcp.AddTool(server, &mcp.Tool{
370
-
Name: "search",
371
-
Description: "Before searching, ensure an index exists. Run `ctxt init .` in your project directory to build the index. For live updates while coding, run `ctxt watch .`. Use `ctxt status` to check index health. "+
372
-
"Then use this search tool to find files by concept. "+
373
-
"Search a codebase for files using concept-based ranked search. Faster and more relevant than grep or find for locating WHERE code lives. "+
374
-
"Query with plain keywords, concepts, partial filenames, or symbol names (e.g. \"auth login\", \"jwt token refresh\", \"payment handler\", \"createUser\"). "+
375
-
"Results are ranked by relevance score (symbol matches +4, synonyms +3, basename +7, exact match +15). "+
376
-
"Set hybrid=true to enable content fallback via ripgrep when index results are sparse. "+
377
-
"Use this instead of grep when you need to find which file handles a concept — grep finds what's INSIDE files, this finds WHICH files matter. "+
378
-
"Do not use for searching file contents (use grep) or file metadata like size/date/permissions (use find).",
Description: "Check the health and coverage of the ctxt codebase index. "+
426
-
"Returns total indexed files, directories, index generation time, and root path. "+
427
-
"Use this FIRST before searching to verify the index exists and is current. If no index exists, tell the user to run `ctxt init .` in their project directory.",
0 commit comments