writeSpreadsheet
Writes a 2D array of values to a specified spreadsheet range, overwriting existing cells. Use it to replace data; append rows separately to add without overwriting.
Instructions
Writes data to a range in a spreadsheet, overwriting existing values. Use appendRows to add data without overwriting.
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": {
"spreadsheetId": "<spreadsheetId>",
"range": "<range>",
"values": "<values>"
},
"name": "writeSpreadsheet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | A1 notation range to write to (e.g., "A1:B2" or "Sheet1!A1:B2"). | |
| values | Yes | 2D array of values to write. Each inner array represents a row. | |
| readHandle | No | Capability returned by the corresponding read tool. Required on the modern MCP runtime, including modern stdio. | |
| spreadsheetId | Yes | The spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL. | |
| valueInputOption | No | How input data should be interpreted. RAW: values are stored as-is. USER_ENTERED: values are parsed as if typed by a user. | USER_ENTERED |