Edit table rows and columns
edit_tableAdd or remove table rows and columns in Google Docs using the table's start index. Choose to insert below/right or delete entire rows/columns with content.
Instructions
Inserts or deletes a row/column of an existing table. The table is addressed by table_start_index — the table block's start index from read_document_text (its startIndex in get_document). action=insert_row adds next to the cell at row_index/column_index (insert_below, default true); insert_column likewise (insert_right, default true); delete_row / delete_column remove the row/column containing that cell WITH ALL ITS CONTENT — that content is unrecoverable. row_index/column_index are 0-based and default to 0. Deleting shifts every later index in the document; re-read before further edits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | What to do with the table. | |
| tab_id | No | Tab to target (from list_tabs). Omit for the first/only tab. | |
| row_index | No | 0-based row of the anchor cell (default 0). | |
| document_id | Yes | The document id — the long id from the document URL (docs.google.com/document/d/<documentId>/edit) or from create_document output. | |
| column_index | No | 0-based column of the anchor cell (default 0). | |
| insert_below | No | insert_row only: insert below the anchor row (default true; false = above). | |
| insert_right | No | insert_column only: insert right of the anchor column (default true; false = left). | |
| table_start_index | Yes | The table's start index (the table block's start in read_document_text). |