write_full_buf
Rewrite an entire file in Neovim by replacing the buffer content in-memory. Undoable until save, and creates the buffer if it doesn't exist.
Instructions
Replace the entire content of a Neovim buffer. The edit happens in-memory and is fully undoable — nothing is written to disk until the user saves.
file: path relative to Neovim's cwd (as shown in get_state buffers).
content: the full new text for the buffer.
Creates the buffer if it doesn't already exist. Use this when you
need to rewrite the whole file. Use find_and_replace_buf instead
for targeted edits that preserve surrounding content.
Returns {total_lines} with the new line count.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>",
"content": "<content>"
},
"name": "write_full_buf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ||
| content | Yes |