Skip to main content
Glama
lewisvoncken

Playwright MCP

by lewisvoncken

browser_navigate

Destructive

Direct a web browser to a specific URL using Playwright MCP's automation capabilities for web page interaction.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • The execute function (handler) for the browser_navigate tool. It ensures a tab is available, navigates to the specified URL, generates a Playwright code snippet, and configures the response with no network wait.
    handle: async (context, params) => {
      const tab = await context.ensureTab();
      await tab.navigate(params.url);
    
      const code = [
        `// Navigate to ${params.url}`,
        `await page.goto('${params.url}');`,
      ];
    
      return {
        code,
        captureSnapshot,
        waitForNetwork: false,
      };
    },
  • Input/output schema definition for the browser_navigate tool, defining the name, title, description, input parameters (url: string), and destructive type.
    schema: {
      name: 'browser_navigate',
      title: 'Navigate to a URL',
      description: 'Navigate to a URL',
      inputSchema: z.object({
        url: z.string().describe('The URL to navigate to'),
      }),
      type: 'destructive',
    },
  • src/tools.ts:36-52 (registration)
    Registration of the browser_navigate tool as part of the snapshotTools array by spreading the result of navigate(true), which includes the tool.
    export const snapshotTools: Tool<any>[] = [
      ...common(true),
      ...console,
      ...dialogs(true),
      ...files(true),
      ...install,
      ...keyboard(true),
      ...navigate(true),
      ...network,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs(true),
      ...testing,
      ...video,
      ...wait(true),
    ];
  • src/tools.ts:54-69 (registration)
    Registration of the browser_navigate tool as part of the visionTools array by spreading the result of navigate(false), which includes the tool.
    export const visionTools: Tool<any>[] = [
      ...common(false),
      ...console,
      ...dialogs(false),
      ...files(false),
      ...install,
      ...keyboard(false),
      ...navigate(false),
      ...network,
      ...pdf,
      ...tabs(false),
      ...testing,
      ...video,
      ...vision,
      ...wait(false),
    ];
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate readOnlyHint=false, openWorldHint=true, and destructiveHint=true, covering safety and scope. The description adds minimal behavioral context beyond this, as 'Navigate to a URL' implies a navigation action but doesn't detail effects like page loading or potential side effects. It doesn't contradict annotations, so it earns a baseline score for adding some value without rich disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence ('Navigate to a URL') that is front-loaded and wastes no words. It directly conveys the core action without unnecessary elaboration, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (navigation with destructive potential), annotations provide safety and scope hints, but there's no output schema. The description is minimal and doesn't explain return values or behavioral nuances like error handling. It's adequate as a basic descriptor but lacks depth for full contextual understanding, aligning with a minimum viable score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'url' parameter fully documented. The description doesn't add any semantic details beyond what the schema provides (e.g., URL format or validation). According to rules, with high schema coverage, the baseline is 3, as the description doesn't compensate but doesn't need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Navigate') and resource ('to a URL'), making the purpose immediately understandable. It distinguishes this tool from siblings like browser_click or browser_type by focusing on URL navigation. However, it doesn't specify what 'navigate' entails in this browser context (e.g., loading a webpage), which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when navigation is appropriate (e.g., for loading pages) or when not to use it (e.g., for interactions like clicking), nor does it reference sibling tools like browser_navigate_back for backward navigation. This leaves the agent without context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/lewisvoncken/playwright-mcp'

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