Skip to main content
Glama
MesuterPikin

Browserbase MCP Server

by MesuterPikin

browserbase_stagehand_navigate

Navigate to specified URLs in a browser for web automation tasks, enabling AI-powered interaction with websites through the Browserbase MCP Server.

Instructions

Navigate to a URL in the browser. Only use this tool with URLs you're confident will work and be up to date. Otherwise, use https://google.com as the starting point

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • The core handler function that performs the browser navigation using Stagehand's page.goto method on the active page.
    async function handleNavigate(
      context: Context,
      params: NavigateInput,
    ): Promise<ToolResult> {
      const action = async (): Promise<ToolActionResult> => {
        try {
          const stagehand = await context.getStagehand();
    
          const pages = stagehand.context.pages();
          const page = pages[0];
    
          if (!page) {
            throw new Error("No active page available");
          }
          await page.goto(params.url, { waitUntil: "domcontentloaded" });
    
          const sessionId = stagehand.browserbaseSessionId;
          if (!sessionId) {
            throw new Error("No Browserbase session ID available");
          }
    
          return {
            content: [
              {
                type: "text",
                text: `Navigated to: ${params.url}`,
              },
            ],
          };
        } catch (error) {
          const errorMsg = error instanceof Error ? error.message : String(error);
          throw new Error(`Failed to navigate: ${errorMsg}`);
        }
      };
    
      return {
        action,
        waitForNetwork: false,
      };
    }
  • The tool schema defining the name 'browserbase_stagehand_navigate', description, and Zod input schema requiring a 'url' string.
    const navigateSchema: ToolSchema<typeof NavigateInputSchema> = {
      name: "browserbase_stagehand_navigate",
      description: `Navigate to a URL in the browser. Only use this tool with URLs you're confident will work and be up to date. 
        Otherwise, use https://google.com as the starting point`,
      inputSchema: NavigateInputSchema,
    };
  • The navigateTool is included in the central TOOLS array which is used for MCP registration.
    export const TOOLS = [
      ...sessionTools,
      navigateTool,
      actTool,
      extractTool,
      observeTool,
      screenshotTool,
      getUrlTool,
      agentTool,
    ];
  • src/index.ts:168-198 (registration)
    The MCP server registration loop that registers all tools from TOOLS array, including browserbase_stagehand_navigate, by calling server.tool with the schema name and a wrapper around the tool's handle function via context.run.
    const tools: MCPToolsArray = [...TOOLS];
    
    // Register each tool with the Smithery server
    tools.forEach((tool) => {
      if (tool.schema.inputSchema instanceof z.ZodObject) {
        server.tool(
          tool.schema.name,
          tool.schema.description,
          tool.schema.inputSchema.shape,
          async (params: z.infer<typeof tool.schema.inputSchema>) => {
            try {
              const result = await context.run(tool, params);
              return result;
            } catch (error) {
              const errorMessage =
                error instanceof Error ? error.message : String(error);
              process.stderr.write(
                `[Smithery Error] ${new Date().toISOString()} Error running tool ${tool.schema.name}: ${errorMessage}\n`,
              );
              throw new Error(
                `Failed to run tool '${tool.schema.name}': ${errorMessage}`,
              );
            }
          },
        );
      } else {
        console.warn(
          `Tool "${tool.schema.name}" has an input schema that is not a ZodObject. Schema type: ${tool.schema.inputSchema.constructor.name}`,
        );
      }
    });
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses behavioral traits: it performs a navigation action (implying it changes browser state), includes a caution about URL reliability, and suggests a fallback. However, it lacks details on error handling, timeouts, or session dependencies, which are relevant for a browser tool.

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?

It is appropriately sized with two sentences that are front-loaded (first states the purpose, second provides guidelines). Every sentence earns its place by adding critical context without redundancy or fluff.

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

Completeness4/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 reliability concerns), no annotations, and no output schema, the description is mostly complete. It covers purpose, usage, and behavioral caution, but could benefit from mentioning potential outputs or errors. However, it adequately addresses core needs for an AI agent.

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 the 'url' parameter. The description adds no additional meaning beyond implying the URL should be reliable, but this is more about usage than parameter semantics. 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.

Purpose5/5

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

The description clearly states the specific action ('Navigate to a URL in the browser') and resource ('URL'), distinguishing it from siblings like 'browserbase_stagehand_get_url' (which likely retrieves rather than navigates) and 'browserbase_screenshot' (which captures screenshots). It uses precise verb+resource language.

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

Usage Guidelines5/5

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

It provides explicit guidance on when to use ('Only use this tool with URLs you're confident will work and be up to date') and when not to use (implying unreliable URLs), with a clear alternative ('Otherwise, use https://google.com as the starting point'). This helps differentiate from other navigation or browsing tools.

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/MesuterPikin/mcp-server-browserbase'

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