cp
Copy files and directories with dry-run support and overwrite protection. Preview operations safely before making changes.
Instructions
Copy files and directories with dry-run and overwrite protection. Destructive to destination: creates new copies on the filesystem. Overwrite protection enabled by default — use --allow_overwrite to replace existing files. Use --dry_run to preview the operation safely. Returns JSON with source and destination paths. Use to duplicate files or directories. Not for moving files — use 'mv' to relocate without copying. Not for setting permissions on copy — use 'install'. See also 'mv', 'install'.
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": {
"source": "<source>",
"destination": "<destination>"
},
"name": "cp"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Source path. | |
| dry_run | No | Report operation without changing files. | |
| parents | No | Create missing parent directories. | |
| recursive | No | Copy directories recursively. | |
| destination | Yes | Destination path. | |
| allow_overwrite | No | Allow replacing/merging destination. |