mcp-gsheetsTools Reference
sheets_insert_rows
Insert new rows at a specific position
sheets_insert_rows
Insert new rows at a specific position in a spreadsheet with optional data.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
spreadsheetId | string | Yes | The spreadsheet ID |
range | string | Yes | A1 notation anchor point (e.g., "Sheet1!A5") |
rows | number | No | Number of rows to insert (default: 1) |
position | string | No | BEFORE (default) or AFTER the anchor row |
inheritFromBefore | boolean | No | Inherit formatting from row before |
values | array[][] | No | Data to fill the new rows |
valueInputOption | string | No | RAW or USER_ENTERED (default) |
Example
{
"tool": "sheets_insert_rows",
"arguments": {
"spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"range": "Sheet1!A5",
"rows": 3,
"position": "AFTER",
"values": [
["John", "Doe", "john@example.com"],
["Jane", "Smith", "jane@example.com"],
["Bob", "Johnson", "bob@example.com"]
]
}
}