Skip to main content
Glama

browser.close_tab

Close a specific browser tab by index to manage multiple open tabs during automated browsing sessions.

Instructions

Close one tab index if more than one tab is open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
indexYes

Implementation Reference

  • The handler implementation for `browser.close_tab` which delegates the call to the session manager.
    async def _close_tab(self, payload: TabActionInput) -> dict[str, Any]:
        return await self.manager.close_tab(payload.session_id, payload.index)
  • Registration of the `browser.close_tab` tool in the McpToolGateway.
        name="browser.close_tab",
        description="Close one tab index if more than one tab is open.",
        input_model=TabActionInput,
        handler=self._close_tab,
    ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LvcidPsyche/auto-browser'

If you have feedback or need assistance with the MCP directory API, please join our Discord server