Skip to main content

This tool is designed to analyze MSBench log zip file, automatically extract error information from nested logs.

Project description

MSBench Analysis MCP

This tool is designed to analyze MSBench log zip file, automatically extract error information from nested logs. It is intended for use as an MCP (Model Context Protocol) server, supporting integration with MCP clients such as Copilot Chat or mcp-inspector.

Features

  • Recursively extracts and analyzes all inner zip files within a given MSBench log archive.
  • Only processes cls.log files located in the output directory of each inner zip.
  • Extracts error messages and error types from logs using regular expressions.
  • Aggregates error statistics by type and provides total error counts.
  • Tracks and reports the number of skipped (unreadable or broken) inner zip files and cls.log files.
  • Generates a detailed Excel report with error details and summary statistics.
  • Provides both summary and detailed error information via MCP tools.

MCP Tools

1. analyze_errors_and_save_report(zipPath: str) -> str

  • Description:
    • Analyzes the specified MSBench zip file, extracts all error information, and saves a detailed Excel report.
    • Returns a summary string including the report path, total error count, error type breakdown, and the number of skipped files.
  • Output Example:
    Report path: /path/to/msbench_analysis_report.xlsx
    Total errors: 42
    Error type count: {"TypeA": 10, "TypeB": 32}
    Skipped inner zip: 1
    Skipped cls.log: 2
    

2. analyze_errors(zipPath: str) -> str

  • Description:
    • Analyzes the specified MSBench zip file and returns a summary plus a detailed error table in markdown format (for use in markdown-capable clients).
    • The table includes file name, error information, and error type for each error found.
  • Output Example:
    Total errors: 42
    Error type count: {"TypeA": 10, "TypeB": 32}
    Skipped inner zip: 1
    Skipped cls.log: 2
    
    | File Name | Error Information | Error Type |
    |-----------|------------------|------------|
    | foo.zip   | ...              | TypeA      |
    | bar.zip   | ...              | TypeB      |
    

Usage

  1. Install dependencies (recommended: use uv or pip):
    uv pip install -r requirements.txt
    # or
    pip install -r requirements.txt
    
  2. Run as an MCP server:
    python -m msbench_analysis_mcp.analysis_server
    
  3. Use an MCP client (such as Copilot Chat or mcp-inspector) to call the tools with the path to your MSBench zip file.

Notes

  • Only cls.log files under the output directory of each inner zip are processed.
  • Broken or unreadable inner zips and logs are counted and reported but do not interrupt the analysis.
  • The markdown table output is best viewed in markdown-capable clients (e.g., Copilot Chat). In plain text clients, the table will be shown as raw markdown.
  • Timeouts: If you encounter timeout issues when using MCP Inspector, please increase the timeout value in the MCP Inspector configuration (e.g., set mcpInspector.requestTimeout to a larger value)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msbench_analysis_mcp-0.1.0.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

msbench_analysis_mcp-0.1.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file msbench_analysis_mcp-0.1.0.tar.gz.

File metadata

File hashes

Hashes for msbench_analysis_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cfb1b1b259f559e672939bd1ee0fe823a5fc33beb8bfaabe879cf465ea3b0455
MD5 6667de7ff23cf51fc05b34d269febc3b
BLAKE2b-256 2236dbff854e2e8da3de367770973cf9a0d06aa09530da7f805c347e5295384a

See more details on using hashes here.

File details

Details for the file msbench_analysis_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for msbench_analysis_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c46314ced1fc730e740c8921c7c1db440a1d12dcd4dad9a3557a25e04f0ae0a7
MD5 436e1ec361d86fe2d58492b0e3fa6020
BLAKE2b-256 c02082108ee5368df225543853a4435820d83612f0f8240d9c6c0a94fbaada70

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page