Skip to main content
Glama
hrmeetsingh

MCP Browser Automation Server

by hrmeetsingh

playwright_navigate

Automatically navigate to a specified URL using Playwright via the MCP Browser Automation Server, enabling streamlined web interaction and task automation.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Implementation Reference

  • The switch case that handles the 'playwright_navigate' tool call, performing navigation using Playwright's page.goto method with optional timeout and waitUntil options.
    case "playwright_navigate":
      try {
        await page!.goto(args.url, {
          timeout: args.timeout || 30000,
          waitUntil: args.waitUntil || "load"
        });
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Navigated to ${args.url} with ${args.waitUntil || "load"} wait`,
            }],
            isError: false,
          },
        };
      } catch (error) {
        return {
          toolResult: {
            content: [{
              type: "text",
              text: `Navigation failed: ${(error as Error).message}`,
            }],
            isError: true,
          },
        };
      }
  • The tool schema definition for 'playwright_navigate', specifying the input schema requiring a 'url' parameter.
    {
      name: "playwright_navigate",
      description: "Navigate to a URL",
      inputSchema: {
        type: "object",
        properties: {
          url: { type: "string" },
        },
        required: ["url"],
      },
    },
  • Array of browser-requiring tools that includes 'playwright_navigate', used to determine if browser should be launched.
    export const BROWSER_TOOLS = [
      "playwright_navigate",
      "playwright_screenshot",
      "playwright_click",
      "playwright_fill",
      "playwright_select",
      "playwright_hover",
      "playwright_evaluate"
    ];

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

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/hrmeetsingh/mcp-browser-automation'

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