edit
Perform smart editing operations on files and directories, including window buffering, appending, patching, line-specific changes, and buffer transfers. Supports fuzzy matching, targeted text replacement, and precise content manipulation.
Instructions
Smart editing operations - window (auto-buffers content), append, patch, at_line, from_buffer
Input Schema
Name | Required | Description | Default |
---|---|---|---|
action | Yes | The specific action to perform | |
content | No | Content to write or append | |
fuzzyThreshold | No | Similarity threshold for fuzzy matching (0-1) | |
lineNumber | No | Line number for at_line action | |
mode | No | Insert mode for at_line action | |
newText | No | Text to replace with | |
oldText | No | Text to search for (supports fuzzy matching) | |
operation | No | Patch operation: append (add after), prepend (add before), or replace | |
path | No | Path to the file or directory | |
target | No | Target identifier - e.g., "Daily Notes::Today" for heading, block ID, or frontmatter field name | |
targetType | No | What to target: heading (by path like "H1::H2"), block (by ID), or frontmatter (field) |
Input Schema (JSON Schema)
{
"properties": {
"action": {
"description": "The specific action to perform",
"enum": [
"window",
"append",
"patch",
"at_line",
"from_buffer"
],
"type": "string"
},
"content": {
"description": "Content to write or append",
"type": "string"
},
"fuzzyThreshold": {
"default": 0.7,
"description": "Similarity threshold for fuzzy matching (0-1)",
"type": "number"
},
"lineNumber": {
"description": "Line number for at_line action",
"type": "number"
},
"mode": {
"description": "Insert mode for at_line action",
"enum": [
"before",
"after",
"replace"
],
"type": "string"
},
"newText": {
"description": "Text to replace with",
"type": "string"
},
"oldText": {
"description": "Text to search for (supports fuzzy matching)",
"type": "string"
},
"operation": {
"description": "Patch operation: append (add after), prepend (add before), or replace",
"enum": [
"append",
"prepend",
"replace"
],
"type": "string"
},
"path": {
"description": "Path to the file or directory",
"type": "string"
},
"target": {
"description": "Target identifier - e.g., \"Daily Notes::Today\" for heading, block ID, or frontmatter field name",
"type": "string"
},
"targetType": {
"description": "What to target: heading (by path like \"H1::H2\"), block (by ID), or frontmatter (field)",
"enum": [
"heading",
"block",
"frontmatter"
],
"type": "string"
}
},
"required": [
"action"
],
"type": "object"
}