delete-browser
Remove browser profiles by specifying user IDs to manage AdsPower browser instances through the LocalAPI MCP server.
Instructions
Delete the browser
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userIds | Yes | The user ids of the browsers to delete, it is required when you want to delete the browser |
Implementation Reference
- src/handlers/browser.ts:80-89 (handler)Implementation of the deleteBrowser handler function. It sends a POST request to the backend API to delete browsers specified by userIds and returns a success message or throws an error on failure.async deleteBrowser({ userIds }: DeleteBrowserParams) { const response = await axios.post(`${LOCAL_API_BASE}${API_ENDPOINTS.DELETE_BROWSER}`, { user_ids: userIds }); if (response.data.code === 0) { return `Browsers deleted successfully: ${userIds.join(', ')}`; } throw new Error(`Failed to delete browsers: ${response.data.msg}`); },
- src/types/schemas.ts:112-114 (schema)Zod schema defining the input parameters for the delete-browser tool: an array of userIds (strings).deleteBrowserSchema: z.object({ userIds: z.array(z.string()).describe('The user ids of the browsers to delete, it is required when you want to delete the browser') }).strict(),
- src/utils/toolRegister.ts:23-24 (registration)Registration of the 'delete-browser' tool in the MCP server, linking the name, description, schema, and wrapped handler.server.tool('delete-browser', 'Delete the browser', schemas.deleteBrowserSchema.shape, wrapHandler(browserHandlers.deleteBrowser));