Skip to main content
Glama

navigate

Load a URL in an existing browser tab and wait for page load. Returns final URL after redirects.

Instructions

Navigate a tab to a URL. Waits for page load. Use create_tab first, then navigate. Returns final URL (may differ due to redirects).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesTab ID from create_tab
urlYesFull URL including protocol (e.g. 'https://example.com')

Implementation Reference

  • Registration of the 'navigate' tool via server.tool() call inside registerNavigationTools()
    export function registerNavigationTools(server: McpServer, deps: ToolDeps): void {
      server.tool(
        "navigate",
        "Navigate a tab to a URL. Waits for page load. Use create_tab first, then navigate. Returns final URL (may differ due to redirects).",
        {
          tabId: z.string().min(1).describe("Tab ID from create_tab"),
          url: z.string().url().describe("Full URL including protocol (e.g. 'https://example.com')")
        },
        async (input: unknown) => {
          try {
            const parsed = z.object({ tabId: z.string().min(1).describe("Tab ID from create_tab"), url: z.string().url().describe("Full URL including protocol (e.g. 'https://example.com')") }).parse(input);
            const tracked = getTrackedTab(parsed.tabId);
            const result = await deps.client.navigate(parsed.tabId, parsed.url, tracked.userId);
            incrementToolCall(parsed.tabId);
            updateTabUrl(parsed.tabId, result.url);
            return okResult({ url: result.url, title: result.title ?? "", refsAvailable: result.refsAvailable });
          } catch (error) {
            return toErrorResult(error);
          }
        }
      );
  • Handler function that parses input, calls client.navigate(), and returns the result
    async (input: unknown) => {
      try {
        const parsed = z.object({ tabId: z.string().min(1).describe("Tab ID from create_tab"), url: z.string().url().describe("Full URL including protocol (e.g. 'https://example.com')") }).parse(input);
        const tracked = getTrackedTab(parsed.tabId);
        const result = await deps.client.navigate(parsed.tabId, parsed.url, tracked.userId);
        incrementToolCall(parsed.tabId);
        updateTabUrl(parsed.tabId, result.url);
        return okResult({ url: result.url, title: result.title ?? "", refsAvailable: result.refsAvailable });
      } catch (error) {
        return toErrorResult(error);
      }
    }
  • Zod schema for input validation: tabId (string) and url (string, url format)
    {
      tabId: z.string().min(1).describe("Tab ID from create_tab"),
      url: z.string().url().describe("Full URL including protocol (e.g. 'https://example.com')")
    },
  • Client helper method that sends the HTTP POST request to the /tabs/{tabId}/navigate endpoint
    async navigate(tabId: string, url: string, userId: string): Promise<NavigateResponse> {
      const response = await this.requestJson(`/tabs/${encodeURIComponent(tabId)}/navigate`, {
        method: "POST",
        body: JSON.stringify({ url, userId })
      }, NavigateRawResponseSchema);
    
      return {
        url: response.url ?? url,
        title: response.title,
        refsAvailable: response.refsAvailable
      };
    }
  • Zod schema for parsing the raw navigate API response (NavigateRawResponseSchema)
    const NavigateRawResponseSchema = z
      .object({
        url: z.string().optional(),
        title: z.string().optional(),
        refsAvailable: z.boolean().optional()
      })
      .passthrough();
Behavior4/5

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

Discloses two key behaviours: waiting for page load and returning the final URL after redirects. Given no annotations, this adds important context about the tool's operation.

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?

Three sentences that are front-loaded with the main purpose, no wasted words. Efficient and easy to parse.

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?

The description covers the essential aspects of the tool: its function, prerequisite, and return value behavior. No output schema exists, but the return value is described (final URL). Adequate for a simple 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?

Schema coverage is 100% with descriptions for both parameters. The description adds minimal extra context (e.g., 'Tab ID from create_tab') but mostly restates schema info.

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 verb 'navigate' and the resource 'a tab to a URL'. It distinguishes itself from the sibling 'navigate_and_snapshot' by focusing only on navigation without additional actions.

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?

Explicitly instructs to use 'create_tab first, then navigate', providing a clear prerequisite. However, it does not mention alternatives like 'navigate_and_snapshot' or when not to use this tool.

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/redf0x1/camofox-mcp'

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