fileditor-mcp
v1.0.104MCP server for file operations
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
set_workspace
Set the workspace root directory. All relative path operations will be based on this directory. You must call this tool to set the correct workspace before performing any file operations.
| Parameter | Type | Description |
|---|---|---|
path * | string | The absolute path to the workspace root directory (e.g., the directory opened by VSCode) |
read_files
Read the entire or partial content of the specified file(s). Supports reading single or multiple files at once. The returned content includes line numbers in the format 'line | content'.
| Parameter | Type | Description |
|---|---|---|
path * | ||
line_range | string | Optional line range, format 'start-end' (only for single file) |
write_files
Create new files or completely overwrite existing files. Supports single or multiple files at once.
| Parameter | Type | Description |
|---|---|---|
content * | ||
line_count * | ||
path * |
list_files
List the files and subdirectories in the specified directory.
| Parameter | Type | Description |
|---|---|---|
path * | string | The directory path to list contents of. The path can be an absolute path or a workspace-relative path. |
recursive | boolean | Whether to recursively list subdirectory contents |
insert_contents
Insert new content at the specified position in the file. Supports editing single or multiple files at once. Negative line numbers are supported for insertion from the end.
| Parameter | Type | Description |
|---|---|---|
content * | ||
line * | ||
path * |
apply_diffs
Perform precise block-based search and replace operations on existing files. Supports single or multiple diff operations on a single file. When processing multiple diffs, the tool automatically handles line number offsets - all start_line values should be based on the original file structure. By default, operates in atomic mode for safe batch operations.
| Parameter | Type | Description |
|---|---|---|
path * | string | The path of the file to modify. The path can be an absolute path or a workspace-relative path. |
replace_content * | ||
search_content * | ||
start_line * | ||
atomic | boolean | Whether to use atomic mode (all-or-nothing). When true (default), validates all diffs before applying any. When false, applies diffs one by one, continuing on failures. |
trim | boolean | Whether to trim whitespace from the beginning and end of each line when comparing search_content with file content. Only affects search and matching - replace_content is inserted exactly as provided.… |
search_and_replace
Search and replace text or regular expressions in a single file.
| Parameter | Type | Description |
|---|---|---|
path * | string | The target file path. The path can be an absolute path or a workspace-relative path. |
replace * | string | The text to replace with |
search * | string | The text or regular expression to search for |
end_line | integer | The ending line of the search range |
ignore_case | boolean | Whether to ignore case when searching |
start_line | integer | The starting line of the search range |
use_regex | boolean | Whether to use regular expressions for searching |