resize_columns
Set explicit pixel widths for spreadsheet columns or auto-fit them to content by specifying a sheet and column range.
Instructions
Set an explicit pixel width for columns, or auto-fit them to content.
Args: spreadsheet_id: The ID of the spreadsheet (found in the URL) sheet: The name of the sheet start_column: 0-based index of the first column to resize (0 = column A) end_column: 0-based index of the last column to resize (inclusive). If omitted, resizes only start_column. pixel_size: Explicit column width in pixels. Mutually exclusive with auto_resize. auto_resize: If True, auto-fit column width to content instead of setting an explicit pixel_size.
Returns: Result of the batchUpdate operation. Returns {"error": ...} without calling the Sheets API if start_column is negative, end_column precedes start_column, or pixel_size isn't positive.
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>",
"start_column": "<start_column>"
},
"name": "resize_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet | Yes | ||
| end_column | No | ||
| pixel_size | No | ||
| auto_resize | No | ||
| start_column | Yes | ||
| spreadsheet_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||