Skip to main content
Glama
cloudflare

Cloudflare Playwright MCP

Official
by cloudflare

browser_navigate

Destructive

Direct a web browser to a specified URL for automated testing or interaction, using Playwright integration with Cloudflare Workers.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • Handler function for browser_navigate tool: navigates the current tab to the specified URL using tab.navigate(), generates corresponding code snippet, and returns tool result.
    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,
      };
    },
  • Schema definition for browser_navigate tool, including name, title, description, Zod input schema for URL, 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:35-50 (registration)
    Registration of browser_navigate by including navigate(true) in the snapshotTools array.
    export const snapshotTools: Tool<any>[] = [
      ...common(true),
      ...console,
      ...dialogs(true),
      ...files(true),
      ...install,
      ...keyboard(true),
      ...navigate(true),
      ...network,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs(true),
      ...testing,
      ...wait(true),
    ];
  • src/tools.ts:52-66 (registration)
    Registration of browser_navigate by including navigate(false) in the visionTools array.
    export const visionTools: Tool<any>[] = [
      ...common(false),
      ...console,
      ...dialogs(false),
      ...files(false),
      ...install,
      ...keyboard(false),
      ...navigate(false),
      ...network,
      ...pdf,
      ...tabs(false),
      ...testing,
      ...vision,
      ...wait(false),
    ];
Behavior3/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, which the description doesn't contradict. The description adds minimal behavioral context beyond annotations—it implies navigation changes browser state but doesn't detail effects like page loading, errors, or timeouts. With annotations covering safety, it earns a baseline score for not contradicting them.

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 with zero wasted words. It's front-loaded and directly states the tool's action, 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.

Completeness2/5

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

Given the tool's complexity (navigation with destructive potential) and lack of output schema, the description is incomplete. It doesn't explain return values (e.g., success/failure), error conditions, or behavioral nuances like redirects. With annotations providing some safety context but no output details, more information is needed for effective use.

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?

Schema description coverage is 100%, with the parameter 'url' fully documented in the schema. The description doesn't add any extra meaning about the parameter (e.g., URL format requirements or validation). Baseline 3 is appropriate as the schema handles the heavy lifting.

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 ('a URL'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like browser_navigate_back or browser_navigate_forward, which are related navigation operations but with different mechanisms.

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 prerequisites (e.g., needing an open browser), exclusions (e.g., not for internal navigation), or comparisons with siblings like browser_navigate_back for backward navigation.

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

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

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