browser_close
Terminate the automated browser session to free system resources after completing web page screenshot capture and testing operations.
Instructions
Close the browser instance
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_close"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:251-265 (handler)Handler for the browser_close tool: closes the Puppeteer browser instance if it exists and resets the browserState.
case 'browser_close': { if (browserState.browser) { await browserState.browser.close(); browserState.browser = null; browserState.page = null; } return { content: [ { type: 'text', text: 'Browser closed', }, ], }; } - src/index.ts:132-139 (registration)Registration of the browser_close tool in the tools list, specifying name, description, and input schema (empty object).
{ name: 'browser_close', description: 'Close the browser instance', inputSchema: { type: 'object', properties: {}, }, },