style_doc_table_cells
Style Google Doc table cells by applying borders, padding, and background colors, with per-edge overrides and row/column spans for formatted tables and signature lines.
Instructions
Apply border, padding, and background styles to table cells in a Google Doc.
Args: doc_id: The Google Doc file ID. table_start_index: The startIndex of the table (from get_doc_structure or insert_doc_table). cells: List of cell style dicts. Each dict must include row_index and column_index, plus any combination of:
background_color (dict): {"red": 0-1, "green": 0-1, "blue": 0-1}
padding_top, padding_right, padding_bottom, padding_left (float): points
border_color (dict): {"red": 0-1, "green": 0-1, "blue": 0-1}
Applies the same color to all four borders (any edge not given its
own border_top/right/bottom/left below).
border_width (float): border line width in points
border_dash_style (str): "SOLID", "DOT", "DASH", "DASH_DOT",
"LONG_DASH", "LONG_DASH_DOT" (default SOLID)
border_top, border_right, border_bottom, border_left (dict): optional
per-edge override, each {"color": {...}, "width": float,
"dash_style": str}. Any field omitted from a per-edge dict falls
back to the uniform border_color/border_width/border_dash_style
above, if given (the Docs API rejects a border with non-zero width
and no color as "transparent", so a width-only override needs a
color from somewhere). An edge with no border_<side> key falls back
entirely to the uniform border_color/border_width/border_dash_style,
if given; with neither, that edge's border is left untouched.
row_span (int): default 1
column_span (int): default 1Returns: Confirmation with docId and count of batchUpdate requests sent.
Example — standard data-room table style (grey header, thin border, 3.6pt padding): table_start_index: cells: [ {"row_index": 0, "column_index": 0, "column_span": <num_cols>, "background_color": {"red": 0.953, "green": 0.953, "blue": 0.953}, "padding_top": 3.6, "padding_right": 3.6, "padding_bottom": 3.6, "padding_left": 3.6, "border_color": {"red": 0, "green": 0, "blue": 0}, "border_width": 0.5, "border_dash_style": "SOLID"} ]
Example — signature line (bottom border only): cells: [ {"row_index": 0, "column_index": 0, "border_bottom": {"color": {"red": 0, "green": 0, "blue": 0}, "width": 1.0}} ]
For form-style column alignment (labels/values lined up without a visible table, since tabStops is read-only — #404), zero padding on every cell is the confirmed part of the recipe; whether border_width: 0 also suppresses a table's default visible border is not yet confirmed live. See docs/design/borderless-table-columns.md.
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": {
"doc_id": "<doc_id>",
"table_start_index": "<table_start_index>",
"cells": "<cells>"
},
"name": "style_doc_table_cells"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cells | Yes | ||
| doc_id | Yes | ||
| table_start_index | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||