add_sheet_tab
Add a new worksheet to a Google Spreadsheet. Creates an empty tab so you can then write data into it via range updates, which is otherwise impossible for non-existent tabs.
Instructions
Add a new tab (worksheet) to a spreadsheet.
Creates an empty worksheet — the structural edit update_sheet_range
and friends can't do, since they only touch cells within tabs that
already exist. After adding, write into it with update_sheet_range
using "<title>!A1" as the range.
sheet_id is the spreadsheet's ID (the long token in its URL,
.../spreadsheets/d/<sheet_id>/edit) and is required. title is the
new tab's name; it must not collide with an existing tab (see
list_sheet_tabs). index optionally sets the tab's 0-based position
in the tab strip (0 puts it first); omit to append it at the end. Returns
a summary including the new tab's numeric sheetId.
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": {
"sheet_id": "<sheet_id>",
"title": "<title>"
},
"name": "add_sheet_tab"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | ||
| title | Yes | ||
| sheet_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |