Skip to main content
Glama
LGDiMaggio

Predictive Maintenance MCP Server

by LGDiMaggio

analyze_envelope

Screen bearing faults by performing envelope-spectrum analysis on a stored vibration signal. Bandpass filter, Hilbert envelope, and FFT identify top spectral peaks for fault detection.

Instructions

    Envelope-spectrum analysis of a stored signal (bearing fault screening).

    THE unified envelope tool: bandpass filter -> Hilbert
    envelope -> mean subtraction + Hann window -> FFT -> top peaks.
    The mean subtraction/window step is an intentional U9 fix: the
    envelope's DC leakage used to bury the low-frequency FTF zone.
    Requires the signal loaded via load_signal() first; the sampling
    rate comes from the stored signal metadata.

    The requested band must fit the signal: an invalid band (low <= 0,
    low >= high, high > Nyquist) raises a ValueError — it is NEVER
    silently clamped. The band used is echoed in the result.

    By default analyzes the LEADING 1.0-second segment (deterministic:
    two identical calls return identical results). Set
    segment_duration=None to analyze the entire signal, or pass
    random_seed to sample a seeded random segment position instead.

    No reference bearing frequencies are assumed: compare the returned
    peaks against frequencies computed for the actual bearing and
    shaft speed (check_bearing_faults or
    calculate_bearing_characteristic_frequencies).

    Args:
        ctx: MCP context for user communication
        signal_id: ID of the stored signal (from load_signal).
        filter_low: Bandpass low edge in Hz (default: 500).
        filter_high: Bandpass high edge in Hz (default: 5000). Must
            not exceed the signal's Nyquist frequency.
        num_peaks: Number of top peaks to return (default: 5).
        segment_duration: Duration in seconds to analyze (default:
            leading 1.0 s). None analyzes the full signal.
        random_seed: Seed for random segment position (default: None =
            deterministic leading segment).

    Returns:
        EnvelopeResult with the band actually used, top peaks, and
        comparison guidance.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
num_peaksNo
signal_idYes
filter_lowNo
filter_highNo
random_seedNo
segment_durationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
diagnosisYesPeak listing and comparison guidance. No reference bearing frequencies are assumed — compare against frequencies computed for the actual bearing and shaft speed.
signal_idYesSignal identifier used
top_peaksYesTop peaks in the envelope spectrum, sorted by frequency
filter_bandYesBandpass filter band (Hz) actually used — echoed from the request
num_samplesYesNumber of samples analyzed (envelope length)
sampling_rateYesSampling rate (Hz)
Behavior5/5

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

With no annotations provided, the description fully bears the burden of behavioral transparency. It details the algorithm steps, confirms deterministic behavior by default, explains the 'U9 fix' for DC leakage, describes error handling (ValueError for invalid bands), and notes that the band used is echoed in the result. This is comprehensive.

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 well-structured with a clear sequence: purpose, algorithm overview, prerequisites, behavioral details, parameter descriptions, returns and raises. While slightly verbose, every sentence adds value and is front-loaded with the most important information.

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 the tool's complexity (6 parameters, algorithm, prerequisites, error conditions, return guidance), the description is remarkably complete. It covers all essential aspects, including the return type 'EnvelopeResult' and comparisons to sibling tools, making it self-sufficient for correct usage.

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?

Despite 0% schema coverage, the description explains every parameter in detail, including default values and constraints (e.g., 'filter_high must not exceed Nyquist', 'segment_duration default leads 1.0 s'). It adds meaning beyond the schema, such as the deterministic leading segment and the random_seed behavior.

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 the tool performs envelope-spectrum analysis of a stored signal for bearing fault screening. It uses specific verb 'analyze' (implied) and resource 'stored signal' with a clear purpose, distinguishing it from siblings like 'analyze_fft' and 'check_bearing_faults'.

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

Usage Guidelines5/5

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

The description explicitly requires the signal to be loaded via 'load_signal()' first, provides the use case (bearing fault screening), and references alternative tools for frequency comparison ('check_bearing_faults' or 'calculate_bearing_characteristic_frequencies'). It also claims to be 'THE unified envelope tool', guiding the agent to use it over others.

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