close_tab
Closes a tab at a given index, leaving the session and other tabs open; call list_pages again before using another index.
Instructions
Close the tab at tabIndex (from list_pages). The session and its other tabs stay open; if the closed tab was active, the last remaining tab becomes active. Tabs after it shift down one index, so call list_pages again before using another index. Closing the last tab leaves the session open with no tabs; the next navigate opens a new one. To end the whole session, use close_browser_session. Returns a confirmation. Fails if the session has no tab at that index.
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": {
"sessionId": "<sessionId>",
"tabIndex": "<tabIndex>"
},
"name": "close_tab"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabIndex | Yes | A tab's 0-based index from list_pages. Errors if the session has no tab at that index. | |
| sessionId | Yes | The id returned by open_browser_session. Errors if no open session has it. |