append_to_file
Append text to the end of a file. Optionally add a trailing newline before the appended content. Writes atomically to avoid corruption.
Instructions
Append content to the end of a file (byte concatenation). Optional ensure_newline_before. Writes atomically.
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": {
"path": "<path>",
"content": "<content>"
},
"name": "append_to_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or workspace-relative path to the file. | |
| content | Yes | Text to append, written byte-for-byte. The caller is responsible for all line endings and spacing. | |
| encoding | No | File encoding. Default: utf-8. Pass utf-8-sig to strip a BOM. | utf-8 |
| project_root | No | Sets (and remembers) the project root for resolving relative paths for this and subsequent calls in the session. | |
| ensure_newline_before | No | If true, insert a single dominant-style line terminator between the original last line and content, but only if the file lacks a trailing one. |