update readme

This commit is contained in:
Marc Goodner 2024-12-03 07:21:59 -08:00
commit da0ef81067

View file

@ -37,33 +37,19 @@ 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 to files with advanced pattern matching - Make selective edits using search and replace
- Features: - Features:
- Multiple positioning modes: - Simple substring matching for finding text
- Line-based: Specify exact line numbers - Git-style preview format for changes
- Pattern-based: Find positions using anchor text - Preview changes with dry run mode
- Context-aware: Verify surrounding content - Preserves original file formatting and indentation
- Insert modes: 'replace', 'before', or 'after' content
- Dry run preview of changes
- Cross-platform line ending support (CRLF/LF)
- Git-friendly content verification
- Inputs: - Inputs:
- `path` (string): File to edit - `path` (string): File to edit
- `edits` (array): List of edit operations - `edits` (array): List of edit operations
- `startLine?` (number): Line number for edit (optional) - `oldText` (string): Text to search for (can be substring)
- `findAnchor?` (string): Text to locate edit position (optional) - `newText` (string): Text to replace with
- `anchorOffset` (number): Lines to offset from anchor (default: 0) - `dryRun` (boolean): Preview changes without applying (default: false)
- `oldText` (string): Content to replace/verify
- `newText` (string): New content to insert
- `insertMode` (string): 'replace', 'before', or 'after' (default: 'replace')
- `beforeContext?` (string): Expected content before edit point (optional)
- `afterContext?` (string): Expected content after edit point (optional)
- `contextRadius` (number): Lines to check for context (default: 3)
- `verifyState` (boolean): Verify content matches before editing (default: true)
- `readBeforeEdit` (boolean): Refresh file state between edits (default: false)
- `dryRun` (boolean): Preview changes without applying them (default: false)
- Returns preview information for dry runs, otherwise applies changes - Returns preview information for dry runs, otherwise applies changes
- Preserves original line endings and handles Git auto CRLF/LF
- **create_directory** - **create_directory**
- Create new directory or ensure it exists - Create new directory or ensure it exists