append_file
Append text content to a file, creating it if missing. Specify path, content, and optional encoding to update logs, CSV, or other files.
Instructions
Append content to an existing file (or create it if it does not exist).
Args:
path: Path to the file.
content: Content to append.
encoding: File encoding. Default: "utf-8".
Returns:
A dict with keys: status, data (path, total_size_bytes).
Examples:
append_file("log.txt", "New entry
") append_file("output.csv", "row1,row2 ")
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| encoding | No | utf-8 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||