open-new-page
Open a new webpage within the AdsPower browser environment using LocalAPI, enabling efficient management and interaction with browser profiles and custom fingerprints.
Instructions
Open a new page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
}
Implementation Reference
- src/handlers/automation.ts:17-22 (handler)The handler function that executes the logic for opening a new page in the browser context using Puppeteer.async openNewPage() { browser.checkConnected(); const newPage = await browser.pageInstance!.context().newPage(); browser.pageInstance = newPage; return `New page opened successfully`; },
- src/utils/toolRegister.ts:53-54 (registration)Registration of the 'open-new-page' tool with the MCP server, specifying name, description, empty schema, and wrapped handler.server.tool('open-new-page', 'Open a new page', schemas.emptySchema.shape, wrapHandler(automationHandlers.openNewPage));
- src/types/schemas.ts:164-164 (schema)Definition of the empty schema used for input validation of the 'open-new-page' tool, requiring no parameters.emptySchema: z.object({}).strict(),