Skip to main content
Glama

navigate_page

Directs a Firefox browser tab to a specified URL for automated testing, web scraping, or browser control tasks.

Instructions

Navigate selected tab to URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesTarget URL

Implementation Reference

  • The main handler function that executes the 'navigate_page' tool. It validates the 'url' input, gets the Firefox instance, refreshes tabs, checks the selected tab, navigates to the URL, and returns a success response.
    export async function handleNavigatePage(args: unknown): Promise<McpToolResponse> {
      try {
        const { url } = args as { url: string };
    
        if (!url || typeof url !== 'string') {
          throw new Error('url parameter is required and must be a string');
        }
    
        const { getFirefox } = await import('../index.js');
        const firefox = await getFirefox();
    
        // Refresh tabs to get latest list
        await firefox.refreshTabs();
        const tabs = firefox.getTabs();
        const selectedIdx = firefox.getSelectedTabIdx();
        const page = tabs[selectedIdx];
    
        if (!page) {
          throw new Error('No page selected');
        }
    
        await firefox.navigate(url);
    
        return successResponse(`✅ [${selectedIdx}] → ${url}`);
      } catch (error) {
        return errorResponse(error as Error);
      }
    }
  • The schema definition for the 'navigate_page' tool, specifying the name, description, and input schema requiring a 'url' string.
    export const navigatePageTool = {
      name: 'navigate_page',
      description: 'Navigate selected tab to URL.',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'Target URL',
          },
        },
        required: ['url'],
      },
    };
  • src/index.ts:110-110 (registration)
    Registration of the 'navigate_page' handler in the toolHandlers Map, mapping the tool name to its execution function.
    ['navigate_page', tools.handleNavigatePage],
  • src/index.ts:154-154 (registration)
    Registration of the 'navigate_page' tool schema in the allTools array, used for listing available tools.
    tools.navigatePageTool,
  • Re-export of the 'navigate_page' tool schema (navigatePageTool) and handler (handleNavigatePage) from pages.ts, making them available centrally.
    export {
      listPagesTool,
      newPageTool,
      navigatePageTool,
      selectPageTool,
      closePageTool,
      handleListPages,
      handleNewPage,
      handleNavigatePage,
      handleSelectPage,
      handleClosePage,
    } from './pages.js';
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 but doesn't mention side effects (e.g., page reload, potential navigation errors), performance implications, or what happens if the URL is invalid. This leaves significant gaps for a mutation 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?

The description is a single, clear sentence with zero wasted words. It's front-loaded and efficiently conveys the core action without unnecessary details, making it easy to parse quickly.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, success indicators, or interaction with sibling tools (e.g., 'select_page' might be needed first). More context is needed given the tool's complexity.

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' documented as 'Target URL'. The description adds no additional meaning beyond this, such as URL format requirements or examples. Baseline 3 is appropriate since 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 the target ('selected tab to URL'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'navigate_history' or 'new_page', which prevents a perfect score.

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 like 'navigate_history' (for back/forward navigation) or 'new_page' (for opening new tabs). It lacks any context about prerequisites, such as needing a selected tab first, which is implied but not stated.

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/mozilla/firefox-devtools-mcp'

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