Edit File
Make line-based edits to a text file. Each edit replaces exact line sequences with new content. Returns a git-style diff showing the changes made. Only works within allowed directories.
Purpose
This skill provides access to the MCP tool edit_file. It allows you to make line-based edits to a text file. each edit replaces exact line sequences with new content. returns a git-style diff showing the changes made. only works within allowed directories..
Parameters
The tool accepts the following parameters:
path
Required
- Type:
string - Description: No description provided
edits
Required
- Type:
array - Description: No description provided
dryRun
Optional
- Type:
boolean - Description: Preview changes using git-style diff format
Usage Instructions
To use this tool:
- Prepare the parameters according to the schema above
- Invoke the MCP tool
edit_filewith the prepared parameters - Process the result returned by the tool
Example
{
"path": "example_value",
"edits": {},
"dryRun": true
}
Expected Output
The tool returns data with the following structure:
- content (
string): No description provided
Notes
- This skill requires an active MCP connection to the server providing the
edit_filetool - Ensure the MCP server is properly configured and running before attempting to use this tool
- Review the parameter requirements carefully to avoid errors