Skip to main content
Glama
BrowserGenie

BrowserGenie MCP Server

by BrowserGenie

navigate_reload

Refresh the current page to update content when it is stuck or outdated, bypassing cache if needed.

Instructions

Refresh the current page. Use this if the page seems stuck, outdated, or needs fresh data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ignoreCacheNoSet to true to force reload from server (skips browser cache)
tabIdNoTarget tab ID (defaults to currently active tab)
apiKeyNoAPI key for authentication if enabled

Implementation Reference

  • The handler function for the 'navigate_reload' tool. Sends a 'navigate_reload' command via WebSocket bridge with optional ignoreCache, tabId, and apiKey parameters. Returns success text 'Page reloaded' or error message.
      async ({ ignoreCache, tabId, apiKey }) => {
        const result = await bridge.sendCommand({
          command: 'navigate_reload',
          params: { ignoreCache },
          tabId,
          apiKey,
          timeout: LONG_TIMEOUT,
        });
        if (!result.success) {
          return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
        }
        return { content: [{ type: 'text', text: 'Page reloaded' }] };
      }
    );
  • The schema (input type definitions) for 'navigate_reload'. Defines optional parameters: ignoreCache (boolean), tabId (number), and apiKey (string).
    server.tool(
      'navigate_reload',
      'Refresh the current page. Use this if the page seems stuck, outdated, or needs fresh data.',
      {
        ignoreCache: z.boolean().optional().describe('Set to true to force reload from server (skips browser cache)'),
        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_reload' as an MCP tool via server.tool() with description 'Refresh the current page.' Inside the registerNavigationTools function which is called from src/tools/index.ts.
      server.tool(
        'navigate_reload',
        'Refresh the current page. Use this if the page seems stuck, outdated, or needs fresh data.',
        {
          ignoreCache: z.boolean().optional().describe('Set to true to force reload from server (skips browser cache)'),
          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 ({ ignoreCache, tabId, apiKey }) => {
          const result = await bridge.sendCommand({
            command: 'navigate_reload',
            params: { ignoreCache },
            tabId,
            apiKey,
            timeout: LONG_TIMEOUT,
          });
          if (!result.success) {
            return { content: [{ type: 'text', text: `Error: ${result.error?.message}` }], isError: true };
          }
          return { content: [{ type: 'text', text: 'Page reloaded' }] };
        }
      );
    }
  • The WebSocketBridge.sendCommand() method used by the handler to dispatch the 'navigate_reload' command to the Chrome extension.
    private pending = new Map<string, PendingRequest>();
    private port: number;
    
    constructor(port: number) {
      this.port = port;
      this.wss = new WebSocketServer({ port });
    
      this.wss.on('connection', (ws) => {
        if (this.client) {
          this.client.close();
        }
        this.client = ws;
        console.error(`[MCP Bridge] Extension connected on port ${this.port}`);
    
        ws.on('message', (data) => {
          try {
            const message = JSON.parse(data.toString());
            if (message.type === 'response' && message.requestId) {
              const pending = this.pending.get(message.requestId);
              if (pending) {
                clearTimeout(pending.timer);
                this.pending.delete(message.requestId);
                pending.resolve({
                  success: message.success,
                  data: message.data,
                  error: message.error,
                });
              }
            }
          } catch (err) {
            console.error('[MCP Bridge] Failed to parse message:', err);
          }
        });
    
        ws.on('close', () => {
          console.error('[MCP Bridge] Extension disconnected');
          if (this.client === ws) {
            this.client = null;
          }
          this.rejectAllPending('Extension disconnected');
        });
    
        ws.on('error', (err) => {
          console.error('[MCP Bridge] WebSocket error:', err.message);
        });
      });
    
      this.wss.on('listening', () => {
        console.error(`[MCP Bridge] WebSocket server listening on port ${this.port}`);
      });
    }
    
    isConnected(): boolean {
      return this.client !== null && this.client.readyState === WebSocket.OPEN;
    }
    
    async sendCommand(cmd: BridgeCommand): Promise<BridgeResponse> {
  • LONG_TIMEOUT constant (60s) used as the timeout for navigate_reload, ensuring the page has enough time to reload.
    export const DEFAULT_TIMEOUT = 30_000;
    export const LONG_TIMEOUT = 60_000;
Behavior3/5

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

No annotations exist, so the description alone must convey behavioral traits. It identifies the action as a refresh but does not disclose side effects like losing unsaved form data, discarding DOM state, or impact on network logs. Basic transparency is present but lacks depth.

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 sentences, no redundancy. The core action ('Refresh the current page') is front-loaded, followed by a succinct usage hint. Every word earns its place.

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?

For a simple reload action with no output schema and 3 optional parameters, the description covers the primary use case. It could mention post-reload behavior (e.g., waits for page load) but is largely complete.

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%, so the baseline is 3. The description adds no additional meaning for ignoreCache, tabId, or apiKey beyond what the schema already provides.

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 'Refresh the current page' with specific verb and resource. It differentiates from sibling navigation tools like navigate_back, navigate_forward, and navigate_to_url by focusing on reloading the current 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?

Provides explicit context for when to use: 'if the page seems stuck, outdated, or needs fresh data.' Does not mention when not to use or offer alternative tools, but the guidance is clear and actionable.

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