Skip to main content
Glama

browserbase_stagehand_navigate

Navigate to a specified URL in a cloud browser to access web content and perform automated interactions. Use this tool to visit websites and initiate web-based workflows.

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 handler function that executes the tool logic: retrieves stagehand and active page, navigates to the URL, and returns a confirmation message.
    async function handleNavigate(
      context: Context,
      params: NavigateInput,
    ): Promise<ToolResult> {
      const action = async (): Promise<ToolActionResult> => {
        try {
          const stagehand = await context.getStagehand();
          const page = await context.getActivePage();
    
          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,
      };
    }
  • Tool schema defining the name 'browserbase_stagehand_navigate', description, and input schema (URL). Note: Input schema defined earlier at lines 6-8.
    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,
    };
  • Creates and exports the navigateTool object, registering the schema and handler.
    const navigateTool: Tool<typeof NavigateInputSchema> = {
      capability: "core",
      schema: navigateSchema,
      handle: handleNavigate,
    };
    
    export default navigateTool;
  • Includes the navigateTool in the central TOOLS array for overall tool registration.
    export const TOOLS = [
      ...sessionTools,
      navigateTool,
      actTool,
      extractTool,
      observeTool,
      screenshotTool,
      getUrlTool,
    ];
  • src/tools/index.ts:1-1 (registration)
    Imports the navigateTool for inclusion in the tools registry.
    import navigateTool from "./navigate.js";
Behavior3/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. It discloses that the tool performs a navigation action, which implies it might load a webpage and could involve network delays or errors. However, it lacks details on behavioral traits like error handling, timeouts, or what happens if the URL is invalid, leaving gaps in transparency for a tool with potential operational risks.

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 appropriately sized and front-loaded, with two sentences that directly convey the purpose and usage guidelines without any wasted words. Every sentence earns its place by providing essential information, making it highly efficient and well-structured.

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 (a navigation action with one parameter) and no annotations or output schema, the description is somewhat complete but has gaps. It covers the basic purpose and usage but lacks details on behavioral aspects like what happens on success or failure, which would be helpful for an AI agent to understand the full context of invoking this tool.

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 documented as 'The URL to navigate to.' The description adds no additional meaning beyond this, such as URL format requirements or examples. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema adequately handles the parameter semantics without extra value from the description.

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 to a URL') and resource ('in the browser'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this navigation tool from sibling tools like 'browserbase_stagehand_get_url' or 'browserbase_stagehand_observe', which might also involve URL operations, so it doesn't reach the highest score.

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

Usage Guidelines4/5

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

The description provides clear usage context: '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.' This offers practical guidance on when to use it and suggests an alternative starting point, but it doesn't explicitly name sibling tools as alternatives or specify when not to use it in relation to them, such as for extracting or observing URLs.

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/kolbertistvan2/stagehand-mcp-server'

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