Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

navigate

Direct a browser to a specific URL using this tool, enabling precise navigation to desired web pages through AdsPower LocalAPI MCP Server.

Instructions

Navigate to the url

Input Schema

NameRequiredDescriptionDefault
urlYesThe url to navigate to

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "url": { "description": "The url to navigate to", "type": "string" } }, "required": [ "url" ], "type": "object" }

Implementation Reference

  • The main handler function for the 'navigate' tool. It checks if the browser is connected, navigates the current page to the provided URL using Puppeteer, and returns a success message.
    async navigate({ url }: NavigateParams) { browser.checkConnected(); await browser.pageInstance!.goto(url); return `Navigated to ${url} successfully`; },
  • 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(),
  • Registers the 'navigate' tool with the MCP server, specifying the name, description, input schema, and wrapped handler function.
    server.tool('navigate', 'Navigate to the url', schemas.navigateSchema.shape, wrapHandler(automationHandlers.navigate));
  • TypeScript type definition for NavigateParams, inferred from the navigateSchema for type safety in the handler.
    export type NavigateParams = z.infer<typeof schemas.navigateSchema>;

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