copyFile
Creates a copy of a Google Drive file or document, optionally with a new name or parent folder, and returns the new copy’s ID and URL.
Instructions
Creates a copy of a file or document in Google Drive. Returns the new copy's ID and URL.
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": {
"fileId": "<fileId>"
},
"name": "copyFile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the copied file (matches the Drive API's own "name" field). If not provided, will use "Copy of [original name]". | |
| fileId | Yes | The file or folder ID from a Google Drive URL or a previous tool result. | |
| newName | No | Deprecated alias for "name", kept for backward compatibility. If both are given, "name" wins. | |
| parentFolderId | No | ID of folder where copy should be placed. If not provided, places in same location as original. |