edit_file
Modify files with AI-powered edits using find-and-replace operations, validation modes, and fuzzy matching to ensure accurate content changes.
Instructions
๐ง ENHANCED Intelligent file editing - FileModificationManager orchestrated operations with smart AI routing. AI-powered targeted modifications with validation, rollback capability, and complexity-based endpoint selection for optimal performance.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
edits | Yes | ||
file_path | Yes | ||
fuzzy_threshold | No | Similarity threshold for fuzzy matching (0.1-1.0, higher = more strict) | |
language | No | ||
max_suggestions | No | Maximum number of fuzzy match suggestions to provide | |
suggest_alternatives | No | Include fuzzy match suggestions in error messages | |
validation_mode | No | strict |
Input Schema (JSON Schema)
{
"properties": {
"edits": {
"items": {
"properties": {
"description": {
"type": "string"
},
"find": {
"type": "string"
},
"replace": {
"type": "string"
}
},
"required": [
"find",
"replace"
],
"type": "object"
},
"type": "array"
},
"file_path": {
"type": "string"
},
"fuzzy_threshold": {
"default": 0.8,
"description": "Similarity threshold for fuzzy matching (0.1-1.0, higher = more strict)",
"maximum": 1,
"minimum": 0.1,
"type": "number"
},
"language": {
"type": "string"
},
"max_suggestions": {
"default": 3,
"description": "Maximum number of fuzzy match suggestions to provide",
"maximum": 10,
"minimum": 1,
"type": "integer"
},
"suggest_alternatives": {
"default": true,
"description": "Include fuzzy match suggestions in error messages",
"type": "boolean"
},
"validation_mode": {
"default": "strict",
"enum": [
"strict",
"lenient",
"dry_run"
],
"type": "string"
}
},
"required": [
"file_path",
"edits"
],
"type": "object"
}