delete-browser
Remove specific browser profiles by user IDs using the MCP Server, enabling efficient management of AdsPower LocalAPI browser instances for streamlined operations.
Instructions
Delete the browser
Input 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 |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"userIds": {
"description": "The user ids of the browsers to delete, it is required when you want to delete the browser",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"userIds"
],
"type": "object"
}
Implementation Reference
- src/handlers/browser.ts:80-89 (handler)The deleteBrowser handler function that sends a POST request to the API to delete browsers by their userIds and returns success or error message.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 for validating input parameters of delete-browser tool: requires 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)Registers the 'delete-browser' tool on the MCP server with description, input schema, and wrapped browserHandlers.deleteBrowser function.server.tool('delete-browser', 'Delete the browser', schemas.deleteBrowserSchema.shape, wrapHandler(browserHandlers.deleteBrowser));