Skip to main content
Glama
LGDiMaggio

Predictive Maintenance MCP Server

by LGDiMaggio

generate_envelope_report

Generate a professional envelope analysis report for stored vibration signals. Detect bearing faults using bandpass filtering and envelope spectrum with peak detection.

Instructions

    Generate professional envelope analysis report (HTML) for a stored signal.

    Generates a professional HTML report file instead of inline content.
    Saves to reports/ directory. Requires the signal loaded via
    load_signal() first; the sampling rate comes from the stored signal
    metadata. Reference bearing frequencies (BPFO/BPFI/BSF/FTF) can be
    passed explicitly or, if omitted, are read from the source file's
    companion _metadata.json when present.

    Args:
        signal_id: ID of the stored signal (from load_signal).
        filter_low: Bandpass filter low cutoff (Hz). Default 500 Hz
        filter_high: Bandpass filter high cutoff (Hz). Default (None)
            adapts to the signal: min(5000, Nyquist-1). An explicit value
            above Nyquist is rejected, never clamped.
        max_freq: Max envelope spectrum frequency to display. Default 500 Hz
        num_peaks: Number of peaks to detect. Default 15
        bearing_freqs: Optional dict with BPFO, BPFI, BSF, FTF
        ctx: MCP context

    Returns:
        Dictionary with file path, metadata, and summary (NO HTML content)

    Raises:
        ValueError: If the signal_id is not loaded, or the stored signal
            has no sampling rate.

    Example:
        >>> # Bearing frequencies computed for YOUR bearing/rpm (here: 6205
        >>> # per CWRU geometry at 1797 RPM)
        >>> result = generate_envelope_report(
        ...     "real_train_OuterRaceFault_1",
        ...     bearing_freqs={"BPFO": 107.36, "BPFI": 162.19, "BSF": 70.58, "FTF": 11.93}
        ... )
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_freqNo
num_peaksNo
signal_idYes
filter_lowNo
filter_highNo
bearing_freqsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses behavioral traits: it saves to file, raises ValueError for missing signal, explains filter_high default adaptation and rejection of values above Nyquist, and clarifies return type (no HTML content). This is thorough and exceeds annotation burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured as a docstring with Args, Returns, Raises, Example. While slightly verbose, every sentence adds value and the main purpose is front-loaded. It could be slightly trimmed but is still highly effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, the description covers purpose, prerequisites, parameter details, return type, exceptions, and an example. The return is clearly described as a dictionary with file path, metadata, and summary, which is sufficient given an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has zero param descriptions (0% coverage), so the description carries full burden. Each parameter is described with meaning beyond the schema: filter_high default adaptation, bearing_freqs optional dict, signal_id prerequisite. This adds substantial semantic value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it generates a professional envelope analysis report (HTML) for a stored signal. It specifies the output is an HTML file saved to reports/ directory. This distinguishes it from siblings like analyze_envelope (which likely returns inline data) and other report generators.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly requires the signal to be loaded via load_signal() first, providing clear usage context. However, it does not explicitly differentiate from siblings or state when not to use this tool versus alternatives, though the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/LGDiMaggio/predictive-maintenance-mcp'

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