edit_table_columns
Add or delete columns in a live Word table by position or index, including multiple columns and optional pre-filled values.
Instructions
Add or delete columns of a table. Add: position "Before" inserts left of the first column, "After" right of the last column; optionally pre-fill with values (2D array, one column per entry). Delete: remove count columns starting at columnIndex (0-based). Note: some Word builds reject column operations with InvalidArgument.
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": {
"tableIndex": "<tableIndex>",
"action": "<action>"
},
"name": "edit_table_columns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of columns (default 1). | |
| action | Yes | Add or delete columns. | |
| values | No | For add: cell texts as 2D array (rows x added columns). | |
| position | No | For add: "Before" inserts at the left edge, "After" at the right edge. | |
| documentId | No | Target document ID from list_documents. Optional when only one document is connected. | |
| tableIndex | Yes | Zero-based table index. | |
| columnIndex | No | For delete: first column index to remove. |