Skip to main content
Glama

browser_navigate

Navigate browser instances to specific URLs with configurable wait conditions and timeouts for automated web interactions.

Instructions

Navigate to a specified URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceIdYesInstance ID
urlYesTarget URL
timeoutNoTimeout in milliseconds
waitUntilNoWait conditionload

Implementation Reference

  • Core handler function that executes the browser navigation using Playwright's page.goto() method.
    private async navigate(instanceId: string, url: string, options: NavigationOptions): Promise<ToolResult> {
      const instance = this.browserManager.getInstance(instanceId);
      if (!instance) {
        return { success: false, error: `Instance ${instanceId} not found` };
      }
    
      try {
        const gotoOptions: any = {
          waitUntil: options.waitUntil
        };
        if (options.timeout) {
          gotoOptions.timeout = options.timeout;
        }
        await instance.page.goto(url, gotoOptions);
        return {
          success: true,
          data: { url: instance.page.url(), title: await instance.page.title() },
          instanceId
        };
      } catch (error) {
        return {
          success: false,
          error: `Navigation failed: ${error instanceof Error ? error.message : error}`,
          instanceId
        };
      }
    }
  • Tool schema definition including name, description, and inputSchema for validation.
      name: 'browser_navigate',
      description: 'Navigate to a specified URL',
      inputSchema: {
        type: 'object',
        properties: {
          instanceId: {
            type: 'string',
            description: 'Instance ID'
          },
          url: {
            type: 'string',
            description: 'Target URL',
          },
          timeout: {
            type: 'number',
            description: 'Timeout in milliseconds',
            default: 30000
          },
          waitUntil: {
            type: 'string',
            enum: ['load', 'domcontentloaded', 'networkidle'],
            description: 'Wait condition',
            default: 'load'
          }
        },
        required: ['instanceId', 'url']
      }
    },
  • src/server.ts:40-45 (registration)
    MCP server registration for listing tools, which includes the browser_navigate tool via BrowserTools.getTools().
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      const tools = this.browserTools.getTools();
      return {
        tools: tools,
      };
    });
  • src/server.ts:48-75 (registration)
    MCP server registration for calling tools, dispatching browser_navigate via BrowserTools.executeTools().
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await this.browserTools.executeTools(name, args || {});
        
        if (result.success) {
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(result.data, null, 2),
              },
            ],
          };
        } else {
          throw new McpError(ErrorCode.InternalError, result.error || 'Tool execution failed');
        }
      } catch (error) {
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Tool execution failed: ${error instanceof Error ? error.message : error}`
        );
      }
    });
  • Dispatch handler in executeTools() that routes browser_navigate calls to the navigate method.
    case 'browser_navigate':
      return await this.navigate(args.instanceId, args.url, {
        timeout: args.timeout || 30000,
        waitUntil: args.waitUntil || 'load'
      });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Navigate') but doesn't explain what this entails—e.g., whether it opens a new page, reloads an existing one, handles errors, or requires specific permissions. This is a significant gap for a tool with potential side effects like navigation.

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 waste. It's front-loaded with the core action and target, making it easy to parse quickly without unnecessary details.

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 complexity of browser navigation (involving instance management, timing, and state changes), no annotations, and no output schema, the description is incomplete. It lacks details on behavior, error handling, or what happens post-navigation, leaving gaps for the agent to operate effectively.

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%, so the schema already documents all parameters (instanceId, url, timeout, waitUntil) with descriptions. The description adds no additional meaning beyond implying a 'url' parameter, which is already covered. Baseline 3 is appropriate as the schema does 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 action ('Navigate') and target ('to a specified URL'), which is specific and unambiguous. However, it doesn't distinguish this tool from sibling navigation tools like 'browser_go_back' or 'browser_go_forward', which are also navigation-related but for different directions.

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 existing browser instance), exclusions, or comparisons to siblings like 'browser_refresh' or 'browser_wait_for_navigation', leaving the agent to infer usage context.

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/sailaoda/concurrent-browser-mcp'

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