setColumnWidths
Sets the width in pixels for one or more spreadsheet columns or ranges in a single call, and supports hiding a column by setting its width to 0.
Instructions
Sets the width (in pixels) of one or more columns in a spreadsheet. Accepts multiple column specs in a single call, each targeting a single column or a contiguous range (e.g., "A", "B:D").
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>",
"columnWidths": "<columnWidths>"
},
"name": "setColumnWidths"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheetName | No | Name of the sheet/tab. Defaults to the first sheet if not provided. | |
| columnWidths | Yes | List of column width specifications to apply. | |
| spreadsheetId | Yes | The spreadsheet ID — the long string between /d/ and /edit in a Google Sheets URL. |