navigate
Direct a browser profile to a specific URL using AdsPower LocalAPI, enabling automated navigation for browser automation tasks.
Instructions
Navigate to the url
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The url to navigate to |
Implementation Reference
- src/handlers/automation.ts:23-26 (handler)The main handler function for the 'navigate' tool. It checks if the browser is connected, navigates the current page to the specified URL using Puppeteer, and returns a success message.async navigate({ url }: NavigateParams) { browser.checkConnected(); await browser.pageInstance!.goto(url); return `Navigated to ${url} successfully`;
- src/types/schemas.ts:173-175 (schema)Zod schema defining the input parameters for the 'navigate' tool: an object with a required 'url' string field.navigateSchema: z.object({ url: z.string().describe('The url to navigate to') }).strict(),
- src/utils/toolRegister.ts:56-57 (registration)Registration of the 'navigate' tool on the MCP server, linking the name, description, input schema, and wrapped handler function.server.tool('navigate', 'Navigate to the url', schemas.navigateSchema.shape, wrapHandler(automationHandlers.navigate));