diff --git a/ccw/src/tools/edit-file.ts b/ccw/src/tools/edit-file.ts index afbf5170..098219a3 100644 --- a/ccw/src/tools/edit-file.ts +++ b/ccw/src/tools/edit-file.ts @@ -415,13 +415,17 @@ function executeLineMode(content: string, params: Params): LineModeResult { // Tool schema for MCP export const schema: ToolSchema = { name: 'edit_file', - description: `Edit file by text replacement or line operations. + description: `Edit file using two modes: "update" for text replacement (default) and "line" for line-based operations. -Usage: +Usage (update mode): edit_file(path="f.js", oldText="old", newText="new") - edit_file(path="f.js", mode="line", operation="insert_after", line=10, text="new line") + edit_file(path="f.js", edits=[{oldText:"a",newText:"b"},{oldText:"c",newText:"d"}]) -Options: dryRun=true (preview diff), replaceAll=true (replace all occurrences)`, +Usage (line mode): + edit_file(path="f.js", mode="line", operation="insert_after", line=10, text="new line") + edit_file(path="f.js", mode="line", operation="delete", line=5, end_line=8) + +Options: dryRun=true (preview diff), replaceAll=true (update mode only)`, inputSchema: { type: 'object', properties: { diff --git a/ccw/src/tools/smart-search.ts b/ccw/src/tools/smart-search.ts index 7736c920..443e390f 100644 --- a/ccw/src/tools/smart-search.ts +++ b/ccw/src/tools/smart-search.ts @@ -946,46 +946,19 @@ async function executePriorityFallbackMode(params: Params): Promise exact -> ripgrep - - Returns results from the first successful search with results - - More efficient than running all backends in parallel - -**Actions:** - - search (default): Intelligent search with auto routing - - init: Create CodexLens index - - status: Check index and embedding availability - - search_files: Return file paths only - -**Workflow:** - 1. Run action="init" to create index - 2. Use auto mode - it routes to hybrid for NL queries, exact for simple queries - 3. Use priority mode for comprehensive fallback search`, +**Modes:** auto (intelligent routing), hybrid (semantic, needs index), exact (FTS), ripgrep (fast, no index), priority (fallback: hybrid→exact→ripgrep)`, inputSchema: { type: 'object', properties: { diff --git a/ccw/src/tools/write-file.ts b/ccw/src/tools/write-file.ts index f74a2bfe..5420db2c 100644 --- a/ccw/src/tools/write-file.ts +++ b/ccw/src/tools/write-file.ts @@ -105,7 +105,7 @@ export const schema: ToolSchema = { description: `Write content to file. Auto-creates parent directories. Usage: write_file(path="file.js", content="code here") -Options: backup=true (backup before overwrite), encoding="utf8"`, +Options: backup=true (backup before overwrite), createDirectories=false (disable auto-creation), encoding="utf8"`, inputSchema: { type: 'object', properties: {