update_file_content
Replace an entire Google Doc or Sheet with new Markdown, HTML, plain text, or CSV content while preserving the file's ID, name, sharing, and location.
Instructions
WRITES. Replace a file's content with new text. For a Google Doc the text is re-imported (Markdown, HTML or plain text), replacing the whole document; for a Sheet pass CSV. The file id, name, sharing and location are unchanged.
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>",
"content": "<content>"
},
"name": "update_file_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fileId | Yes | ||
| content | Yes | ||
| mimeType | No | MIME type of `content`. Default text/markdown for a Doc, text/csv for a Sheet, otherwise the file's own type. |