Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

open-new-page

Open a new browser page within AdsPower profiles to manage multiple browsing sessions for testing and automation tasks.

Instructions

Open a new page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'open-new-page' tool. It checks if the browser is connected, creates a new page in the current context using Puppeteer, sets it as the current page instance, and returns a success message.
    async openNewPage() { browser.checkConnected(); const newPage = await browser.pageInstance!.context().newPage(); browser.pageInstance = newPage; return `New page opened successfully`; },
  • The schema used for the 'open-new-page' tool, which is an empty object schema indicating no input parameters are required.
    emptySchema: z.object({}).strict(),
  • Registers the 'open-new-page' tool with the MCP server, providing the tool name, description, input schema, and the wrapped handler function.
    server.tool('open-new-page', 'Open a new page', schemas.emptySchema.shape, wrapHandler(automationHandlers.openNewPage));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AdsPower/local-api-mcp-typescript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server