Skip to main content
Glama

browser_navigate

Direct a browser to navigate to a specified URL, set navigation timeouts, and wait for specific page load criteria like 'load' or 'domcontentloaded' for precise control.

Instructions

Navigate to a specific URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNoNavigation timeout in milliseconds
urlYesURL to navigate to
waitUntilNoNavigation wait criteria

Implementation Reference

  • Executes the browser navigation by calling page.goto with the provided URL, timeout, and waitUntil options. Returns success or error message.
    async function handleBrowserNavigate(page: Page, args: any): Promise<{ toolResult: CallToolResult }> { try { await page.goto(args.url, { timeout: args.timeout || 30000, waitUntil: args.waitUntil || "load" }); return { toolResult: { content: [{ type: "text", text: `Navigated to ${args.url}`, }], isError: false, }, }; } catch (error) { return { toolResult: { content: [{ type: "text", text: `Navigation failed: ${(error as Error).message}`, }], isError: true, }, }; } }
  • Defines the tool name, description, and input schema requiring 'url' with optional 'timeout' and 'waitUntil' parameters.
    { name: "browser_navigate", description: "Navigate to a specific URL", inputSchema: { type: "object", properties: { url: { type: "string", description: "URL to navigate to" }, timeout: { type: "number", description: "Navigation timeout in milliseconds" }, waitUntil: { type: "string", description: "Navigation wait criteria", enum: ["load", "domcontentloaded", "networkidle", "commit"] } }, required: ["url"] } },
  • Registers the dispatch for 'browser_navigate' tool calls to the specific handler function within the main executeToolCall switch statement.
    case "browser_navigate": return await handleBrowserNavigate(activePage!, args);

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/imprvhub/mcp-browser-agent'

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