save_tree
Validate and write a power-tree to a .ltp3 file atomically, refusing invalid trees and preventing accidental overwrites with optional backups.
Instructions
Validate and write the tree to a .ltp3 file. Refuses (VALIDATION_FAILED) when
validation finds errors and writes nothing. By default it writes a NEW file: path, or
'_edited.ltp3' beside the opened file (in the working directory for
templates and new trees). An existing target fails with FILE_EXISTS unless
overwrite=true, which first keeps a '.bak-' copy; overwriting the file this
tree was opened from also fails with STALE_FILE if it changed on disk since it was
opened. Writes are atomic, restricted to the allowed directories (LTP3_ALLOWED_DIRS,
default: the server's working directory), refused inside the installed program
folders, and only .ltp3 is accepted. Returns the path, size, SHA-256, backup path and
the validation report.
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": {
"tree_id": "<tree_id>"
},
"name": "save_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| tree_id | Yes | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||