merge_cells
Combine a specified cell range in a Google Sheets spreadsheet into one cell, or merge rows or columns independently, to organize headers and grouped data.
Instructions
Merge a range of cells into one cell.
Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to merge (e.g. "A1:C3") merge_type: "MERGE_ALL" (default), "MERGE_COLUMNS" (merge each column independently), or "MERGE_ROWS" (merge each row independently)
Returns: Result of the batchUpdate operation
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": {
"spreadsheet_id": "<spreadsheet_id>",
"sheet": "<sheet>",
"range": "<range>"
},
"name": "merge_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| range | Yes | ||
| sheet | Yes | ||
| merge_type | No | MERGE_ALL | |
| spreadsheet_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||