Skip to content

Core Tools

MCP Filesystem Ultra v4.0.0 provides 16 consolidated tools (down from 59 in v3.x). Each tool is intelligent — it auto-selects the optimal strategy based on file size, context, and parameters provided.


Read file contents. Supports full reads, line ranges, head/tail mode, and base64 encoding for binary files. Auto-converts WSL/Windows paths.

Replaces: mcp_read, read_file, read_file_range, read_base64, chunked_read_file, intelligent_read

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to file (WSL or Windows format)
max_linesNonumberMax lines to return (0 = all)
modeNostringRead mode: all, head, tail
start_lineNonumberStarting line number (1-indexed) for range read
end_lineNonumberEnding line number (inclusive) for range read
encodingNostringSet to "base64" to read file as base64-encoded binary

Examples:

// Read entire file
read_file({ path: "C:\\project\\main.go" })
// Read first 50 lines
read_file({ path: "/mnt/c/project/main.go", max_lines: 50, mode: "head" })
// Read last 20 lines (log tailing)
read_file({ path: "server.log", max_lines: 20, mode: "tail" })
// Read specific line range (most token-efficient)
read_file({ path: "main.go", start_line: 100, end_line: 150 })
// Read binary file as base64
read_file({ path: "image.png", encoding: "base64" })

Write file atomically. Supports text content or base64-encoded binary. Auto-creates parent directories. Auto-converts WSL/Windows paths.

Replaces: mcp_write, write_file, create_file, write_base64, streaming_write_file, intelligent_write

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath where to write (WSL or Windows format)
contentNostringText content to write to the file
content_base64NostringBase64-encoded binary content to write
encodingNostringSet to "base64" when content is base64-encoded

Examples:

// Write text file
write_file({ path: "config.json", content: "{}" })
// Write binary file from base64
write_file({ path: "image.png", content_base64: "iVBORw0KGgo..." })
// Alternative base64 via encoding flag
write_file({ path: "data.bin", content: "SGVsbG8=", encoding: "base64" })

Edit file with multiple modes. Default mode: smart text replacement with auto-backup and risk validation. Only blocks CRITICAL risk (>=90% content change). Auto-converts WSL/Windows paths.

Replaces: mcp_edit, edit_file, smart_edit_file, intelligent_edit, recovery_edit, search_and_replace, replace_nth_occurrence, regex_transform_file

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to file (WSL or Windows format)
old_textNostringText to be replaced (default mode)
new_textNostringNew text to replace with (default mode)
old_strNostringAlias for old_text
new_strNostringAlias for new_text
forceNobooleanForce operation even if CRITICAL risk (default: false)
modeNostringEdit mode: "replace" (default), "search_replace", "regex"
occurrenceNonumberWhich occurrence to replace: 1=first, 2=second, -1=last, -2=second-to-last (default: all)
patternNostringRegex or literal pattern (for search_replace and regex modes)
replacementNostringReplacement text (for search_replace mode)
patterns_jsonNostringJSON array of patterns for regex mode: [{"pattern": "regex", "replacement": "$1...", "limit": -1}]
case_sensitiveNobooleanCase sensitive matching (default: true, for regex mode)
create_backupNobooleanCreate backup before transformation (default: true, for regex mode)
dry_runNobooleanValidate without applying changes (default: false, for regex mode)
whole_wordNobooleanMatch whole words only (default: false, for occurrence mode)

Modes:

ModeWhen to Use
replace (default)Simple find-and-replace in a single file. Use old_text/new_text.
search_replaceRecursive search-and-replace across a directory. Use pattern/replacement.
regexAdvanced regex transformations with capture groups. Use patterns_json.

Examples:

// Simple replacement (default mode)
edit_file({ path: "main.go", old_text: "v3.0.0", new_text: "v4.0.0" })
// Replace only the first occurrence
edit_file({ path: "config.ts", old_text: "TODO", new_text: "DONE", occurrence: 1 })
// Replace last occurrence with whole-word matching
edit_file({ path: "app.js", old_text: "count", new_text: "total", occurrence: -1, whole_word: true })
// Recursive search and replace across directory
edit_file({ path: "src/", mode: "search_replace", pattern: "oldFunc", replacement: "newFunc" })
// Regex transformation with capture groups
edit_file({
path: "types.go",
mode: "regex",
patterns_json: JSON.stringify([
{ pattern: "func (\\w+)\\(\\)", replacement: "func $1(ctx context.Context)", limit: -1 }
]),
dry_run: true
})

List directory contents with caching. Auto-converts WSL/Windows paths.

Replaces: mcp_list, list_directory

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to directory (WSL or Windows format)

Examples:

list_directory({ path: "C:\\project\\src" })
list_directory({ path: "/mnt/c/project" })

Search files by name or content. Supports regex and literal patterns. Auto-routes between fast search and advanced text search based on parameters. Auto-converts WSL/Windows paths.

Replaces: mcp_search, smart_search, advanced_text_search, count_occurrences

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringBase directory or file (WSL or Windows format)
patternYesstringRegex or literal pattern
include_contentNobooleanInclude file content search (default: false)
file_typesNostringComma-separated file extensions (e.g., .go,.txt)
case_sensitiveNobooleanCase sensitive search (default: false)
whole_wordNobooleanMatch whole words only (default: false)
include_contextNobooleanInclude surrounding context lines (default: false)
context_linesNonumberNumber of context lines (default: 3)
count_onlyNobooleanCount pattern occurrences without full search (default: false)
return_linesNostringReturn line numbers of count matches ("true"/"false", for count_only mode)

Auto-routing: When case_sensitive, whole_word, or include_context are provided, the tool automatically routes to the advanced text search engine. When count_only is true, it dispatches to the occurrence counter. Otherwise, it uses the fast smart search path.

Examples:

// Fast file name search
search_files({ path: "C:\\project", pattern: "main.go" })
// Content search with file type filter
search_files({ path: ".", pattern: "TODO", include_content: true, file_types: ".go,.ts" })
// Advanced search with context
search_files({ path: ".", pattern: "func.*Error", case_sensitive: true, include_context: true })
// Count occurrences in a file
search_files({ path: "main.go", pattern: "fmt\\.Sprintf", count_only: true })
// Count with line numbers
search_files({ path: "main.go", pattern: "TODO", count_only: true, return_lines: "true" })

Analyze a file operation without executing (Plan Mode / dry-run). Useful for previewing the impact of writes, edits, and deletes before committing.

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
operationYesstringOperation to analyze: file, optimize, write, edit, delete
pathYesstringPath to the file
contentNostringContent for write analysis
old_textNostringText to be replaced (for edit analysis)
new_textNostringReplacement text (for edit analysis)

Operations:

OperationPurpose
fileAnalyze file size, type, recommendations
optimizeGet optimization strategy suggestion
writeDry-run write analysis
editDry-run edit with risk assessment
deleteDry-run delete impact analysis

Examples:

// Analyze a file
analyze_operation({ operation: "file", path: "large-data.json" })
// Preview edit risk
analyze_operation({ operation: "edit", path: "config.go", old_text: "v3", new_text: "v4" })
// Preview delete impact
analyze_operation({ operation: "delete", path: "old-module/" })

Create a new directory (and parent directories if needed).

Annotations:

AnnotationValue
readOnlyfalse
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to the directory to create

Examples:

create_directory({ path: "src/components/ui" })

Delete a file or directory. Default: soft-delete (moves to trash). Use permanent: true for hard delete.

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to the file or directory to delete
permanentNobooleanPermanently delete instead of soft-delete (default: false)

Examples:

// Soft-delete (recoverable)
delete_file({ path: "old-config.json" })
// Permanent delete
delete_file({ path: "temp/cache", permanent: true })

Move or rename a file or directory to a new location.

Replaces: move_file, rename_file

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
source_pathYesstringCurrent path of the file/directory
dest_pathYesstringNew path for the file/directory

Examples:

// Move file
move_file({ source_path: "src/old.go", dest_path: "src/new.go" })
// Rename directory
move_file({ source_path: "components", dest_path: "ui-components" })

Copy a file or directory to a new location. Preserves permissions.

Annotations:

AnnotationValue
readOnlyfalse
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
source_pathYesstringPath of the file/directory to copy
dest_pathYesstringDestination path for the copy

Examples:

copy_file({ source_path: "config.json", dest_path: "config.backup.json" })
copy_file({ source_path: "templates/", dest_path: "templates-backup/" })

Get detailed information about a file or directory (size, modification time, permissions, type).

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to the file or directory

Examples:

get_file_info({ path: "main.go" })

Apply multiple edits to a single file atomically. Much faster than calling edit_file multiple times. Only blocks CRITICAL risk (>=90% change).

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
pathYesstringPath to the file to edit
edits_jsonYesstringJSON array of edits: [{"old_text": "...", "new_text": "..."}, ...]
forceNobooleanForce operation even if CRITICAL risk (default: false)

Examples:

// Rename a variable across a file
multi_edit({
path: "main.go",
edits_json: JSON.stringify([
{ old_text: "oldVarName", new_text: "newVarName" },
{ old_text: "OldFuncName", new_text: "NewFuncName" }
])
})
// Apply multiple fixes atomically
multi_edit({
path: "config.ts",
edits_json: JSON.stringify([
{ old_text: "port: 3000", new_text: "port: 8080" },
{ old_text: "debug: true", new_text: "debug: false" },
{ old_text: "v1.0.0", new_text: "v2.0.0" }
])
})

Execute multiple file operations atomically, run multi-step pipelines, or batch rename files. Provide exactly one of: request_json, pipeline_json, or rename_json.

Replaces: batch_operations, execute_pipeline, batch_rename_files

Annotations:

AnnotationValue
readOnlyfalse
destructivetrue
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
request_jsonNostringJSON with operations array and options. Fields: operations (array), atomic (bool), create_backup (bool), validate_only (bool)
pipeline_jsonNostringJSON pipeline definition with name, steps, and optional flags (dry_run, force, stop_on_error, create_backup, verbose, parallel)
rename_jsonNostringJSON with batch rename parameters. Fields: path, mode, find, replace, prefix, suffix, pattern, extension, start_number, padding, recursive, file_pattern, preview, case_sensitive

Supported operations: write, edit, copy, move, delete, create_dir

batch_operations({
request_json: JSON.stringify({
operations: [
{ type: "write", path: "file1.go", content: "package main" },
{ type: "copy", source: "a.txt", destination: "b.txt" },
{ type: "create_dir", path: "new_folder" }
],
atomic: true,
create_backup: true
})
})

Multi-step file transformation pipeline with 12 actions, conditional logic, template variables, and parallel execution. See Pipeline Tools for full reference.

Supported steps: search, read_ranges, edit, multi_edit, count_occurrences, regex_transform, copy, rename, delete, aggregate, diff, merge

batch_operations({
pipeline_json: JSON.stringify({
name: "refactor-todos",
parallel: true,
stop_on_error: true,
create_backup: true,
steps: [
{ id: "find", action: "search", params: { path: ".", pattern: "TODO", file_types: [".go"] } },
{ id: "count", action: "count_occurrences", input_from: "find", params: { pattern: "TODO" } },
{ id: "fix", action: "edit", input_from: "find",
condition: { type: "count_gt", step_ref: "count", value: "0" },
params: { old_text: "TODO", new_text: "DONE" } }
]
})
})

Modes: find_replace, add_prefix, add_suffix, number_files, regex_rename, change_extension, to_lowercase, to_uppercase

batch_operations({
rename_json: JSON.stringify({
path: "src/",
mode: "find_replace",
find: "old_",
replace: "new_",
recursive: true,
preview: true
})
})

Manage file backups. Backups are created automatically before destructive operations. Use this tool to list, inspect, compare, clean up, or restore backups.

Replaces: backup, restore_backup, list_backups, get_backup_info, compare_with_backup, cleanup_backups

Annotations:

AnnotationValue
readOnlyfalse
destructivefalse
idempotentfalse

Parameters:

ParameterRequiredTypeDescription
actionNostringAction: list (default), info, compare, cleanup, restore
backup_idNostringBackup ID (required for info, compare, restore)
file_pathNostringFile path for compare or selective restore
limitNonumberMax backups to return for list (default: 20)
filter_operationNostringFilter by operation: edit, delete, batch, all
filter_pathNostringFilter by file path (substring match)
newer_than_hoursNonumberOnly backups newer than N hours
older_than_daysNonumberFor cleanup: delete backups older than N days (default: 7)
dry_runNobooleanFor cleanup/restore: preview without executing (default: true for cleanup, false for restore)
previewNobooleanFor restore: show diff without restoring (default: false)

Action routing:

ActionRequired ParamsDescription
list(none)List all backups with optional filters
infobackup_idShow detailed backup information
comparebackup_id, file_pathCompare current file with backup version
cleanup(none)Clean up old backups
restorebackup_idRestore file(s) from a backup

Examples:

// List recent backups
backup({})
backup({ action: "list", newer_than_hours: 24 })
// Get backup details
backup({ action: "info", backup_id: "20260313-143022-abc123" })
// Compare file with backup
backup({ action: "compare", backup_id: "20260313-143022-abc123", file_path: "main.go" })
// Preview restore
backup({ action: "restore", backup_id: "20260313-143022-abc123", preview: true, file_path: "main.go" })
// Restore from backup
backup({ action: "restore", backup_id: "20260313-143022-abc123" })
// Clean up old backups (dry run)
backup({ action: "cleanup", older_than_days: 30, dry_run: true })

WSL/Windows file integration. Sync files between WSL and Windows, check integration status, or configure auto-sync.

Replaces: wsl_sync, wsl_status, configure_autosync, autosync_status

Annotations:

AnnotationValue
readOnlyfalse
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
actionNostringAction: sync (default), status, autosync_config, autosync_status
wsl_pathNostringSource WSL path for sync
windows_pathNostringDestination or source Windows path for sync
directionNostringSync direction: wsl_to_windows, windows_to_wsl, bidirectional
create_dirsNobooleanCreate destination directories (default: true)
filter_patternNostringFile filter pattern for workspace sync
dry_runNobooleanPreview changes without executing (default: false)
enabledNobooleanEnable/disable auto-sync (for autosync_config)
sync_on_writeNobooleanAuto-sync on write operations (default: true)
sync_on_editNobooleanAuto-sync on edit operations (default: true)
silentNobooleanSilent mode for auto-sync (default: false)

Action routing:

ActionDescription
sync (default)Copy files between WSL and Windows. Auto-detects direction from path format.
statusShow WSL/Windows integration status
autosync_configConfigure automatic sync (requires enabled param)
autosync_statusShow current auto-sync configuration and status

Examples:

// Check WSL status
wsl({ action: "status" })
// Copy file from WSL to Windows
wsl({ wsl_path: "/home/user/project/main.go" })
// Copy file from Windows to WSL
wsl({ windows_path: "C:\\project\\config.json" })
// Workspace sync with filter
wsl({ direction: "wsl_to_windows", filter_pattern: "*.go", dry_run: true })
// Enable auto-sync
wsl({ action: "autosync_config", enabled: true, sync_on_write: true })
// Check auto-sync status
wsl({ action: "autosync_status" })

Get server information, help, performance stats, and manage code artifacts.

Replaces: stats, get_help, artifact, performance_stats, get_edit_telemetry, capture_last_artifact, write_last_artifact, artifact_info

Annotations:

AnnotationValue
readOnlytrue
destructivefalse
idempotenttrue

Parameters:

ParameterRequiredTypeDescription
actionNostringAction: help (default), stats, artifact
topicNostringHelp topic: overview, workflow, tools, read, write, edit, search, batch, errors, examples, tips, all
sub_actionNostringFor artifact: capture, write, info
contentNostringArtifact content to capture
pathNostringPath for writing artifact

Action routing:

ActionDescription
help (default)Show usage instructions. Use topic to narrow.
statsShow performance metrics and edit telemetry
artifactManage code artifacts via sub_action

Examples:

// Get help
server_info({})
server_info({ action: "help", topic: "edit" })
// Performance stats
server_info({ action: "stats" })
// Capture artifact in memory
server_info({ action: "artifact", sub_action: "capture", content: "function hello() {}" })
// Write artifact to file
server_info({ action: "artifact", sub_action: "write", path: "output.js" })
// Check artifact info
server_info({ action: "artifact", sub_action: "info" })

CategoryCountTools
Reading1read_file
Writing1write_file
Editing2edit_file, multi_edit
Search1search_files
File Management4delete_file, move_file, copy_file, get_file_info
Directory2list_directory, create_directory
Analysis1analyze_operation
Batch / Pipeline1batch_operations
Backup1backup
WSL1wsl
Server1server_info

Total: 16 tools (consolidated from 59 in v3.x)