mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 03:54:09 +02:00
updated readme
This commit is contained in:
@@ -36,6 +36,35 @@ Node.js server implementing Model Context Protocol (MCP) for filesystem operatio
|
||||
- `path` (string): File location
|
||||
- `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 new directory or ensure it exists
|
||||
- Input: `path` (string)
|
||||
|
||||
Reference in New Issue
Block a user