Copy file
copy_fileCopy a single file to a new path on the same backend, preserving mode and mtime locally; use it to duplicate one file when the destination does not yet exist.
Instructions
Copy one file to a new path on the same backend. Use when: duplicating a single file. Instead: copy_tree for a folder tree; copy_path_to_backend across backends or for files that take over 30 s (it resumes). Behavior: only adds. A repeat fails with 'already exists'. Native copy (S3, WebDAV, cp over SSH) where possible; locally mode and mtime are kept. dst's parent must exist; a folder as src fails. Refuses secret files. Time limit: 30 s. Returns: {ok: true}.
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_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dst | No | The new file's path, including its name; must not exist yet (absolute, or relative to the MCP root). Required unless dst_b64 is given. | |
| src | No | The file 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes |