Skip to content

Feature Request: Enhanced Network Logs Tool with Pagination and Export Capabilities #205

@kanekanefy

Description

@kanekanefy

Problem Statement

The current getNetworkLogs MCP tool is experiencing significant limitations when handling large datasets, resulting in token limit exceeded errors and poor user experience for data analysis workflows.

Current Issues Identified

1. Token Limit Exceeded

The getNetworkLogs tool frequently returns responses exceeding the 25,000 token limit, with observed cases reaching 43,088 tokens. 1 This causes the tool to fail entirely when network activity is high.

2. Lack of Pagination Support

The current MCP tool implementation lacks pagination parameters such as offset and limit. 1 The tool simply fetches all available data from the /network-success endpoint without any mechanism to retrieve data in manageable chunks.

3. No File Export Functionality

There is currently no built-in capability to export network logs to files for offline analysis. Users cannot save large datasets for later examination or share them with team members for collaborative debugging.

4. Missing Filtering Capabilities

The tool lacks filtering parameters to narrow down results by:

  • Time range (start/end timestamps)
  • HTTP status codes
  • Request methods
  • URL patterns
  • Response size thresholds

Current System Architecture Context

The network logs flow through a three-tier architecture:

  1. Chrome Extension captures network requests 2
  2. Browser Tools Server stores and serves the data via /network-success endpoint 3
  3. MCP Server exposes the getNetworkLogs tool to AI clients

The server already implements basic truncation logic 4 , but this is insufficient for large datasets.

Proposed Solutions

1. Implement Pagination Parameters

Add support for pagination parameters in the getNetworkLogs tool:

  • limit: Maximum number of entries to return (default: 50)
  • offset: Number of entries to skip (default: 0)
  • page: Page number for easier navigation

2. Add Filtering Parameters

Implement filtering capabilities:

  • timeRange: Object with start and end timestamps
  • statusCodes: Array of HTTP status codes to include
  • methods: Array of HTTP methods to filter by
  • urlPattern: Regex pattern for URL matching

3. File Export Functionality

Add a new MCP tool exportNetworkLogs that:

  • Accepts the same filtering parameters as getNetworkLogs
  • Exports data to JSON/CSV format
  • Returns file path or download link
  • Supports large datasets without token limitations

4. Enhanced Response Format

Modify the response structure to include:

  • Total count of available logs
  • Current page information
  • Pagination metadata (hasNext, hasPrevious)
  • Export options availability

Implementation Priority

  1. High Priority: Pagination support to immediately resolve token limit issues
  2. Medium Priority: Basic filtering (time range, status codes)
  3. Medium Priority: File export functionality
  4. Low Priority: Advanced filtering options

Expected Benefits

  • Eliminates token limit exceeded errors
  • Enables efficient analysis of large network datasets
  • Improves debugging workflow for complex applications
  • Provides better data management capabilities for development teams
  • Maintains backward compatibility with existing implementations

This enhancement will significantly improve the usability of the BrowserTools MCP system for analyzing network activity in production applications.

Wiki pages you might want to explore:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions