edit_file_content
Modify text files by replacing specified content with new text, preserving indentation and generating a git-style diff. Use it to preview changes or apply edits directly to files in the workspace.
Instructions
Make line-based edits to a text file in the workspace filesystem. Each edit attempts to replace an exact match of 'oldText' with 'newText'. If no exact match is found, it attempts a line-by-line match ignoring leading/trailing whitespace. Indentation of the first line is preserved, and relative indentation of subsequent lines is attempted. Returns a git-style diff showing the changes made (or previewed if dryRun is true).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
dryRun | No | If true, preview changes using git-style diff format without saving. | |
edits | Yes | An array of edit operations to apply sequentially. | |
path | Yes | The path of the file to edit (relative to the workspace directory). |
Input Schema (JSON Schema)
You must be authenticated.
Other Tools from Vertex AI MCP Server
- answer_query_direct
- answer_query_websearch
- create_directory
- edit_file_content
- explain_topic_with_docs
- generate_project_guidelines
- get_directory_tree
- get_doc_snippets
- get_filesystem_info
- list_directory_contents
- move_file_or_directory
- read_file_content
- read_multiple_files_content
- save_answer_query_direct
- save_answer_query_websearch
- save_doc_snippet
- save_generate_project_guidelines
- save_topic_explanation
- search_filesystem
- write_file_content
Related Tools
- @skydeckai/mcp-server-aidd
- @alekspetrov/mcp-docs-service
- @famano/mcp-server-office
- @famano/mcp-server-office
- @davidorex/git-forensics-mcp