Skip to main content
Glama

browser_navigate

Directs automated browsers to a specified URL within the Playwright MCP, enabling structured web page interactions without screenshots or vision models.

Instructions

Navigate to a 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 core handler function that executes the browser_navigate tool: parses input URL, navigates the current tab, and returns a generated Playwright code snippet.
    handle: async (context, params) => { const validatedParams = navigateSchema.parse(params); const currentTab = await context.ensureTab(); return await currentTab.run(async tab => { await tab.navigate(validatedParams.url); const code = [ `// Navigate to ${validatedParams.url}`, `await page.goto('${validatedParams.url}');`, ]; return { code }; }, { captureSnapshot, }); },
  • Zod schema defining the input parameters for the browser_navigate tool (URL string). Converted to JSON schema for MCP.
    const navigateSchema = z.object({ url: z.string().describe('The URL to navigate to'), });
  • src/index.ts:37-47 (registration)
    Registration of browser_navigate (via ...navigate(true)) in the snapshotTools array used for MCP server creation.
    const snapshotTools: Tool[] = [ ...common(true), ...console, ...files(true), ...install, ...keyboard(true), ...navigate(true), ...pdf, ...snapshot, ...tabs(true), ];
  • src/index.ts:49-59 (registration)
    Registration of browser_navigate (via ...navigate(false)) in the screenshotTools array used for MCP server creation.
    const screenshotTools: Tool[] = [ ...common(false), ...console, ...files(false), ...install, ...keyboard(false), ...navigate(false), ...pdf, ...screen, ...tabs(false), ];
  • The tool schema object including name, description, and input schema for MCP protocol compliance.
    schema: { name: 'browser_navigate', description: 'Navigate to a URL', inputSchema: zodToJsonSchema(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/markbustamante77/mcp'

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