updated readme
This commit is contained in:
parent
1096d5cd75
commit
9f2a77e044
1 changed files with 29 additions and 0 deletions
|
|
@ -36,6 +36,35 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
|
||||||
- `path` (string): File location
|
- `path` (string): File location
|
||||||
- `content` (string): File content
|
- `content` (string): File content
|
||||||
|
|
||||||
|
- **edit_file**
|
||||||
|
- Make selective edits to files with advanced pattern matching
|
||||||
|
- Features:
|
||||||
|
- Multiple positioning modes:
|
||||||
|
- Line-based: Specify exact line numbers
|
||||||
|
- Pattern-based: Find positions using anchor text
|
||||||
|
- Context-aware: Verify surrounding content
|
||||||
|
- Insert modes: 'replace', 'before', or 'after' content
|
||||||
|
- Dry run preview of changes
|
||||||
|
- Cross-platform line ending support (CRLF/LF)
|
||||||
|
- Git-friendly content verification
|
||||||
|
- Inputs:
|
||||||
|
- `path` (string): File to edit
|
||||||
|
- `edits` (array): List of edit operations
|
||||||
|
- `startLine?` (number): Line number for edit (optional)
|
||||||
|
- `findAnchor?` (string): Text to locate edit position (optional)
|
||||||
|
- `anchorOffset` (number): Lines to offset from anchor (default: 0)
|
||||||
|
- `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
|
||||||
|
- 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
|
||||||
- Input: `path` (string)
|
- Input: `path` (string)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue