MCPVault

create_file_code

MCP tool from Vscode MCP Server by juehang

Creates a new file using VS Code's WorkspaceEdit API

How to use it

create_file_code is exposed by the Vscode MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the create_file_code tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.

FULL VSCODE MCP SERVER LISTING

Other tools in Vscode MCP Server (35)

command

The shell command to execute

content

The content to write to the file

copy_file_code

Copies a file to a new location using VS Code's file system API

cwd

(optional): Optional working directory for the command (default: '.')

encoding

(optional): File encoding (default: utf-8)

endLine

The end line number (1-based, inclusive)

execute_shell_command_code

Executes a shell command in the VS Code integrated terminal with shell integration

filePath

The current path of the file or directory to rename

format

(optional): Output format ('text' or 'json'). Default: 'text'

get_diagnostics_code

Checks for warnings and errors in your workspace

get_document_symbols_code

for file structure overview instead of reading entire files

get_symbol_definition_code

for type info and docs without full file context

ignoreIfExists

(optional): Whether to ignore if the file exists (default: false)

includeSource

(optional): Whether to include the diagnostic source. Default: true

line

The line number of the symbol

list_files_code

Lists files and directories in your workspace

maxCharacters

(optional): Maximum character count (default: 100,000)

maxDepth

(optional): Maximum nesting depth to display

maxResults

(optional): Maximum number of results to return (default: 10)

move_file_code

Moves a file or directory to a new location using VS Code's WorkspaceEdit API

newName

The new name for the file or directory

originalCode

The original code for validation

overwrite

(optional): Whether to overwrite if target already exists (default: false)

path

The path to list files from

query

The search query for symbol names

read_file_code

Reads file contents

recursive

(optional): Whether to list files recursively

rename_file_code

Renames a file or directory using VS Code's WorkspaceEdit API

replace_lines_code

Replaces specific lines in a file

search_symbols_code

to find symbols by name across the project

severities

(optional): Array of severity levels to include (0=Error, 1=Warning, 2=Information, 3=Hint). Default: [0, 1]

sourcePath

The current path of the file or directory to move

startLine

The start line number (1-based, inclusive)

symbol

The symbol name to look for on the specified line

targetPath

The new path where the file or directory should be moved to