Skip to main content
Glama
freema
by freema

clear_snapshot

Remove cached browser snapshots to resolve stale data issues in Firefox automation workflows.

Instructions

Clear snapshot cache. Usually not needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary MCP tool handler for 'clear_snapshot'. Acquires Firefox instance via getFirefox and calls its clearSnapshot method, returning a success response.
    export async function handleClearSnapshot(_args: unknown): Promise<McpToolResponse> {
      try {
        const { getFirefox } = await import('../index.js');
        const firefox = await getFirefox();
    
        firefox.clearSnapshot();
    
        return successResponse('🧹 Snapshot cleared');
      } catch (error) {
        return errorResponse(error as Error);
      }
    }
  • Tool schema definition including name 'clear_snapshot', description, and empty input schema.
    export const clearSnapshotTool = {
      name: 'clear_snapshot',
      description: 'Clear snapshot cache. Usually not needed.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    };
  • src/index.ts:128-128 (registration)
    Registration of the clear_snapshot tool handler in the central toolHandlers Map.
    ['clear_snapshot', tools.handleClearSnapshot],
  • src/index.ts:172-172 (registration)
    Inclusion of clearSnapshotTool in the allTools array for MCP tool listing.
    tools.clearSnapshotTool,
  • FirefoxClient.clearSnapshot() method invoked by the tool handler, which delegates to the SnapshotManager.clear().
    clearSnapshot(): void {
      if (!this.snapshot) {
        throw new Error('Not connected');
      }
      this.snapshot.clear();
    }

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