get-opened-browser
Retrieve a list of currently active browser instances from the AdsPower LocalAPI MCP Server for profile management and automation tasks.
Instructions
Get the list of opened browsers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/browser.ts:119-126 (handler)The handler function that implements the logic for the 'get-opened-browser' tool by querying the API for opened browsers and returning the list.async getOpenedBrowser() { const response = await axios.get(`${LOCAL_API_BASE}${API_ENDPOINTS.GET_OPENED_BROWSER}`); if (response.data.code === 0) { return `Opened browser list: ${JSON.stringify(response.data.data.list, null, 2)}`; } throw new Error(`Failed to get opened browsers: ${response.data.msg}`); },
- src/types/schemas.ts:164-164 (schema)The input schema for the 'get-opened-browser' tool, which is empty as it requires no parameters.emptySchema: z.object({}).strict(),
- src/utils/toolRegister.ts:29-30 (registration)The registration of the 'get-opened-browser' tool in the MCP server, linking to the handler and schema.server.tool('get-opened-browser', 'Get the list of opened browsers', schemas.emptySchema.shape, wrapHandler(browserHandlers.getOpenedBrowser));