update_file_content
Modify specific rows in a file by updating content or replacing substrings. Provide the file path, new content, and optional row numbers for targeted changes.
Instructions
Update content at specific row(s) in a file
Args:
path: Path to the file
content: New content to place at the specified row(s)
row: Row number to update (0-based, optional)
rows: List of row numbers to update (0-based, optional)
substring: If provided, only replace this substring within the specified row(s), not the entire row
Returns:
Operation result information
Input Schema
Name | Required | Description | Default |
---|---|---|---|
content | Yes | ||
path | Yes | ||
row | No | ||
rows | No | ||
substring | No |
Input Schema (JSON Schema)
{
"properties": {
"content": {
"title": "Content",
"type": "string"
},
"path": {
"title": "Path",
"type": "string"
},
"row": {
"default": null,
"title": "Row",
"type": "integer"
},
"rows": {
"default": null,
"items": {},
"title": "Rows",
"type": "array"
},
"substring": {
"default": null,
"title": "Substring",
"type": "string"
}
},
"required": [
"path",
"content"
],
"title": "update_file_contentArguments",
"type": "object"
}