update_borders
Apply or clear outer and inner borders on a Google Sheets cell range by specifying style and color for each edge.
Instructions
Apply or clear borders on the edges of a cell range.
Args: spreadsheet_id: The ID of the spreadsheet sheet: The name of the sheet range: A1 notation range to border (e.g. "A1:D5") top: Border spec for the top edge of the range, e.g. {"style": "SOLID", "color": {"red": 0.0, "green": 0.0, "blue": 0.0}}. "style" is required and must be one of "DOTTED", "DASHED", "SOLID", "SOLID_MEDIUM", "SOLID_THICK", "DOUBLE", or "NONE" (clears the border). "color" is an optional RGB dict. "width" is optional and deprecated by the Sheets API in favor of "style", but still accepted. bottom: Border spec for the bottom edge, same shape as top. left: Border spec for the left edge, same shape as top. right: Border spec for the right edge, same shape as top. inner_horizontal: Border spec for the horizontal lines between rows inside the range, same shape as top. inner_vertical: Border spec for the vertical lines between columns inside the range, same shape as top.
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": "update_borders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| left | No | ||
| range | Yes | ||
| right | No | ||
| sheet | Yes | ||
| bottom | No | ||
| inner_vertical | No | ||
| spreadsheet_id | Yes | ||
| inner_horizontal | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||