Skip to main content
Glama

navigate_history

Navigate browser history back or forward in the selected tab to test navigation flows, verify page states, or automate browsing sequences.

Instructions

Navigate the selected tab's history back or forward. NOTE: After navigation, UIDs from previous snapshots are stale—take a new snapshot before UID-based actions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYesDirection to navigate in history

Implementation Reference

  • The handler function that implements the core logic for the 'navigate_history' tool, performing back or forward navigation in the browser history using Firefox DevTools.
    export async function handleNavigateHistory(args: unknown): Promise<McpToolResponse> { try { const { direction } = args as { direction: 'back' | 'forward' }; if (!direction || (direction !== 'back' && direction !== 'forward')) { throw new Error('direction parameter is required and must be "back" or "forward"'); } const { getFirefox } = await import('../index.js'); const firefox = await getFirefox(); if (direction === 'back') { await firefox.navigateBack(); } else { await firefox.navigateForward(); } return successResponse(`✅ ${direction}`); } catch (error) { return errorResponse(error as Error); } }
  • The tool schema definition including name, description, and input schema for the 'navigate_history' tool.
    export const navigateHistoryTool = { name: 'navigate_history', description: 'Navigate history back/forward. UIDs become stale.', inputSchema: { type: 'object', properties: { direction: { type: 'string', enum: ['back', 'forward'], description: 'back or forward', }, }, required: ['direction'], }, };
  • src/index.ts:145-145 (registration)
    Registration of the 'navigate_history' tool handler in the central toolHandlers Map used for tool execution.
    ['navigate_history', tools.handleNavigateHistory],
  • src/index.ts:189-189 (registration)
    Inclusion of the 'navigate_history' tool definition in the allTools array used for listing available tools.
    tools.navigateHistoryTool,

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

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