Skip to main content
Glama

get_all_debug_activity

Retrieve a combined feed of all debug events on the Firefox MCP Server, enabling detailed monitoring and troubleshooting of browser automation activities. Specify tab ID, time range, and event limit for precise debugging.

Instructions

Get combined feed of all debug events

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
sinceNo
tabIdNo

Implementation Reference

  • The core handler function for 'get_all_debug_activity'. Aggregates debug events from multiple sources (console, errors, network, WebSocket), sorts by timestamp, applies optional filters (since, limit), and returns a combined JSON feed.
    async getAllDebugActivity(args = {}) {
      const { tabId, since, limit = 100 } = args;
      const effectiveTabId = tabId || this.activeTabId;
      
      // Combine all debug events with timestamps
      const allEvents = [];
      
      // Console logs
      const logs = this.consoleLogs.get(effectiveTabId) || [];
      logs.forEach(log => allEvents.push({ ...log, source: 'console' }));
      
      // JavaScript errors
      const errors = this.jsErrors.get(effectiveTabId) || [];
      errors.forEach(error => allEvents.push({ ...error, source: 'error' }));
      
      // Network activity
      const network = this.networkActivity.get(effectiveTabId) || [];
      network.forEach(activity => allEvents.push({ ...activity, source: 'network' }));
      
      // WebSocket messages (get from page)
      if (this.pages.has(effectiveTabId)) {
        const page = this.pages.get(effectiveTabId);
        const wsMessages = await page.evaluate(() => window._wsMessages || []);
        wsMessages.forEach(msg => allEvents.push({ ...msg, source: 'websocket' }));
      }
      
      // Sort by timestamp
      allEvents.sort((a, b) => a.timestamp - b.timestamp);
      
      // Filter by since
      let filtered = since ? allEvents.filter(event => event.timestamp >= since) : allEvents;
      
      // Limit results
      filtered = filtered.slice(-limit);
    
      return {
        content: [{
          type: 'text',
          text: `All Debug Activity (${filtered.length} events):\n` + JSON.stringify(filtered, null, 2)
        }]
      };
    }
  • Tool registration in ListToolsRequestSchema response, including name, description, and input schema definition.
    {
      name: 'get_all_debug_activity',
      description: 'Get combined feed of all debug events',
      inputSchema: {
        type: 'object',
        properties: {
          tabId: { type: 'string' },
          since: { type: 'number' },
          limit: { type: 'number', default: 100 }
        }
      }
    },
  • Dispatcher case in CallToolRequestSchema handler that routes tool calls to the getAllDebugActivity method.
    case 'get_all_debug_activity':
      return await this.getAllDebugActivity(args);

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/JediLuke/firefox-mcp-server'

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