Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

close_browser

Terminates the active browser instance on Chromium ARM64 Browser, ensuring cleanup after web automation or testing tasks on ARM64 devices like Raspberry Pi.

Instructions

Close the browser instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that closes the WebSocket connection to the browser tab, kills the Chromium process, resets tab ID, and returns a success message.
    async closeBrowser() { if (wsConnection) { wsConnection.close(); wsConnection = null; } if (chromiumProcess) { chromiumProcess.kill('SIGTERM'); chromiumProcess = null; } currentTabId = null; return { content: [{ type: 'text', text: 'Browser closed successfully' }], }; }
  • Registration of the 'close_browser' tool in the ListTools response, including name, description, and empty input schema.
    { name: 'close_browser', description: 'Close the browser instance', inputSchema: { type: 'object', properties: {}, }, }, ],
  • Enhanced handler function that closes the WebSocket, gracefully kills the Chromium process with timeout fallback to SIGKILL, resets state, and returns success.
    async closeBrowser() { if (wsConnection) { wsConnection.close(); wsConnection = null; } if (chromiumProcess && chromiumProcess.exitCode === null) { chromiumProcess.kill('SIGTERM'); // Wait for graceful shutdown await new Promise(resolve => { chromiumProcess.on('exit', resolve); setTimeout(() => { chromiumProcess.kill('SIGKILL'); resolve(); }, 5000); }); chromiumProcess = null; } currentTabId = null; return { content: [{ type: 'text', text: 'Browser closed successfully' }], }; }
  • index.js:336-342 (registration)
    Registration of the 'close_browser' tool in the full-featured server's ListTools response, with name, description, and empty input schema.
    name: 'close_browser', description: 'Close the browser instance', inputSchema: { type: 'object', properties: {}, }, },
  • Dispatch case in CallToolRequest handler that routes 'close_browser' calls to the closeBrowser method.
    case 'close_browser': return await this.closeBrowser();

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/nfodor/mcp-chromium-arm64'

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