update_file
Replace a Drive file's contents with a local file while preserving its ID, link, sharing, and revision history. Only works on files this app created.
Instructions
Replace the contents of a Drive file this app created with a local file (up to 100 MB), keeping its ID, link, sharing, and revision history. Refuses files the app did not create (created_by_app is false). This reads the given local file.
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": {
"file_id": "<file_id>",
"path": "<path>"
},
"name": "update_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute local path (~ is expanded); relative paths are rejected; the file with the new contents | |
| file_id | Yes | Drive file ID from search_files or get_file |