Copy path
copy_pathCopy a file or directory within the workspace, enabling recursive for folders and overwrite to replace an existing target file when duplicating templates.
Instructions
Copy a file, or a directory with recursive=true, inside the workspace. overwrite=true replaces an existing file; symbolic links and protected files inside a directory are skipped. Use when: you duplicate a file or folder, for example to start from a template. Avoid when: you move or rename (move_path). Output: from, to, kind, overwritten, entries, bytes, skipped_symlinks/skipped_protected when any. Missing source gives not_found, an existing target without overwrite gives conflict.
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": {
"from": "<from>",
"to": "<to>"
},
"name": "copy_path"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | New workspace path: the final name, not a parent directory. | |
| from | Yes | Existing workspace path to copy. | |
| reason | No | Optional why (max 400 chars), audit-logged. | |
| overwrite | No | true replaces an existing target file (default false). A directory is never replaced. | |
| recursive | No | true is required to copy a directory (default false). | |
| create_dirs | No | true creates missing parent directories of `to` (default true). |