Copy folder tree
copy_treeCopies a folder tree or one file to another path on the same backend, creating folders and skipping existing files unless overwrite is enabled. Use it to duplicate or merge folders.
Instructions
Copy a folder tree (or one file) to another path on the same backend. Use when: duplicating or merging a folder on one backend. Instead: copy_file for a single file; copy_path_to_backend across backends, or for files or trees that take over 5 min (resumable=true). Behavior: breadth-first; src's entries land in dst, folders are created. Existing files are skipped unless overwrite=true (destructive). A repeat with overwrite=true rewrites the same files. Locally mode and mtime are kept. Symlinked files are copied as plain files; symlinked folders and secret files give error entries. A rerun finishes a truncated or timed-out copy (copied files are skipped). Time limit: 5 min. Returns: {entries, truncated, complete}; entry fields and reasons explained in outputSchema.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "copy_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dst | No | The copy (absolute, or relative to the MCP root): for a file the new file, for a folder the folder that becomes the copy, made if missing. Required unless dst_b64 is given. | |
| src | No | The file or folder to copy (absolute, or relative to the MCP root). Required unless src_b64 is given. | |
| backend | No | Backend id from list_backends; omit for the default. | |
| dst_b64 | No | dst as base64 of its raw bytes, for non-UTF-8 names; replaces dst. | |
| src_b64 | No | src as base64 of its raw bytes, for non-UTF-8 names; replaces src. | |
| max_depth | No | Levels to visit, counted from 1: 1 = src's own entries. Deeper folders get a 'max-depth' record. | |
| max_files | No | Most files to copy; truncated=true when there were more. | |
| overwrite | No | true: replace files that exist at the destination. false: skip them (reason 'exists'). | |
| max_file_bytes | No | Files larger than this many bytes are skipped (default 10 GiB). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | ||
| complete | Yes | ||
| truncated | Yes |