update read me for current impl

This commit is contained in:
Marc Goodner 2024-12-04 20:51:39 -08:00
commit 7417d4dc07

View file

@ -37,23 +37,28 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
- `content` (string): File content - `content` (string): File content
- **edit_file** - **edit_file**
- Make selective edits using search and replace - Make selective edits using advanced pattern matching and formatting
- Features: - Features:
- Simple substring matching for finding text - Line-based and multi-line content matching
- Git-style preview format for changes - Whitespace normalization with indentation preservation
- Fuzzy matching with confidence scoring
- Multiple simultaneous edits with correct positioning
- Indentation style detection and preservation
- Git-style diff output with context
- Preview changes with dry run mode - Preview changes with dry run mode
- Preserves consistent indentation patterns - Failed match debugging with confidence scores
- Limitations:
- Intended for content changes, not code formatting
- Mixed tabs/spaces can cause pattern matching issues
- Use code formatters (e.g., Prettier, ESLint) before content edits
- Inputs: - Inputs:
- `path` (string): File to edit - `path` (string): File to edit
- `edits` (array): List of edit operations - `edits` (array): List of edit operations
- `oldText` (string): Text to search for (can be substring) - `oldText` (string): Text to search for (can be substring)
- `newText` (string): Text to replace with - `newText` (string): Text to replace with
- `dryRun` (boolean): Preview changes without applying (default: false) - `dryRun` (boolean): Preview changes without applying (default: false)
- Returns preview information for dry runs, otherwise applies changes - `options` (object): Optional formatting settings
- `preserveIndentation` (boolean): Keep existing indentation (default: true)
- `normalizeWhitespace` (boolean): Normalize spaces while preserving structure (default: true)
- `partialMatch` (boolean): Enable fuzzy matching (default: true)
- Returns detailed diff and match information for dry runs, otherwise applies changes
- Best Practice: Always use dryRun first to preview changes before applying them
- **create_directory** - **create_directory**
- Create new directory or ensure it exists - Create new directory or ensure it exists