Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

navigate_back

Go back to the previous page in browser history. Avoid navigating directly to the previous URL for a more efficient action.

Instructions

Go back to the previous page in browser history. Use this instead of navigating to the previous URL directly when possible.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoTarget tab ID (defaults to currently active tab)
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • The tool handler for 'navigate_back'. Registers an MCP tool that sends a 'navigate_back' command via WebSocketBridge. Accepts optional tabId and apiKey parameters, returns success/error response.
    server.tool(
      'navigate_back',
      'Go back to the previous page in browser history. Use this instead of navigating to the previous URL directly when possible.',
      {
        tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'navigate_back',
          params: {},
          tabId,
          apiKey,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: 'Navigated back' }] };
      }
    );
  • Input schema for 'navigate_back': tabId (optional number) and apiKey (optional string) validated with Zod.
    {
      tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
      apiKey: z.string().optional().describe('API key for authentication if enabled'),
    },
  • Registration of 'navigate_back' tool via server.tool() call within registerNavigationTools function.
    server.tool(
      'navigate_back',
      'Go back to the previous page in browser history. Use this instead of navigating to the previous URL directly when possible.',
      {
        tabId: z.number().optional().describe('Target tab ID (defaults to currently active tab)'),
        apiKey: z.string().optional().describe('API key for authentication if enabled'),
      },
      async ({ tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'navigate_back',
          params: {},
          tabId,
          apiKey,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: 'Navigated back' }] };
      }
    );
  • registerNavigationTools is invoked from registerAllTools, which wires up all tool groups including navigation tools.
    registerNavigationTools(server, bridge);
Behavior4/5

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

No annotations provided, but description clearly indicates a history-based navigation action with no hidden side effects; no contradictions.

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?

Two concise, front-loaded sentences with no redundancy; every word adds value.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool and lack of output schema, the description fully explains purpose and usage context.

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 covers all parameters (tabId, apiKey) with descriptions, so description adds no extra meaning; baseline score of 3.

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?

Clearly states 'Go back to the previous page in browser history', distinguishing it from siblings like 'navigate_forward' and 'navigate_to_url'.

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 advises using this over direct URL navigation, but lacks when-not-to-use or alternative tools for forward/reload.

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/BrowserGenie/mcp'

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