playwright-browser-close
To close the current Playwright page, close the page to end the session or free resources.
When & Why to Use This Skill
This Claude skill enables the efficient termination of active Playwright browser pages, ensuring optimal resource management and session cleanup during automated web workflows. By properly closing pages, it prevents memory leaks and maintains the stability of the automation environment.
Use Cases
- Resource Management: Automatically closing browser tabs after completing data extraction tasks to free up system memory and CPU resources.
- Session Cleanup: Ensuring a clean state for subsequent automation tasks by properly ending the current browser session.
- Error Handling: Closing the current page as part of a recovery routine when a web automation script encounters a timeout or navigation error.
- Multi-tab Workflow Control: Managing complex browser interactions by closing specific pages that are no longer required in a multi-step process.
| name | playwright-browser-close |
|---|---|
| description | "To close the current Playwright page, close the page to end the session or free resources." |
Usage
Use the MCP tool dev-swarm.request to send the payload as a JSON string:
{"server_id":"playwright","tool_name":"browser_close","arguments":{}}
Tool Description
Close the page
Arguments Schema
The schema below describes the arguments object in the request payload.
{
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}
Background Tasks
If the tool returns a task id, poll the task status via the MCP request tool:
{"server_id":"playwright","method":"tasks/status","params":{"task_id":"<task_id>"}}