Skip to main content
Glama

playwright_navigate

Navigate to a specified URL using the Playwright framework, set viewport dimensions, and configure timeout and wait conditions for precise browser automation.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
heightNoViewport height in pixels (default: 1080)
timeoutNoNavigation timeout in milliseconds
urlYes
waitUntilNoNavigation wait condition
widthNoViewport width in pixels (default: 1920)

Implementation Reference

  • The main handler logic for the 'playwright_navigate' tool. It uses Playwright's page.goto() to navigate to the specified URL with optional timeout and waitUntil options, returning success or error message.
    case "playwright_navigate": try { await page!.goto(args.url, { timeout: args.timeout || 30000, waitUntil: args.waitUntil || "load" }); return { content: [{ type: "text", text: `Navigated to ${args.url}`, }], isError: false, }; } catch (error) { return { content: [{ type: "text", text: `Navigation failed: ${(error as Error).message}`, }], isError: true, }; }

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/lars-hagen/mcp-playwright-cdp'

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