Skip to main content
Glama
LGDiMaggio

Predictive Maintenance MCP Server

by LGDiMaggio

analyze_envelope

Analyze vibration signals using envelope analysis to detect bearing faults. Returns peak frequencies and diagnosis based on bandpass filtering and Hilbert transform.

Instructions

    Perform Envelope Analysis to detect bearing faults.

    Envelope analysis is particularly effective for detecting faults in ball/roller bearings.
    The signal is high-pass filtered, then the envelope is calculated via Hilbert transform,
    and finally the envelope spectrum is analyzed.

    By default, analyzes a RANDOM 1.0-second segment from the signal for efficiency.
    Set segment_duration=None to analyze the entire signal.

    Returns ONLY peak information and diagnosis text (no full arrays) to avoid context overflow.

    **CRITICAL - LLM Inference Policy:**
    - **NEVER infer fault type from filename** (e.g., "OuterRaceFault_1.csv" does NOT mean outer race fault exists)
    - **NEVER assume signal characteristics from filename** (e.g., "baseline" does NOT mean healthy)
    - Treat ALL filenames as opaque identifiers
    - Base diagnosis ONLY on frequency-domain evidence (peaks matching BPFO/BPFI/BSF/FTF)
    - If filename suggests a fault but analysis shows no evidence, report "No fault detected despite filename"

    **CRITICAL - Parameter Validation:**
    - Sampling rate is auto-detected from metadata if available
    - If no metadata: user MUST provide sampling_rate or results will be UNRELIABLE
    - Segment duration defaults to 1.0s but can be customized
    - User will be notified of all assumptions before analysis proceeds

    Args:
        ctx: MCP context for user communication
        filename: Name of the file containing the signal
        sampling_rate: Sampling frequency in Hz (auto-detect from metadata if None)
        filter_low: Low frequency of bandpass filter in Hz (default: 500 Hz)
        filter_high: High frequency of bandpass filter in Hz (default: 2000 Hz)
        num_peaks: Number of main peaks to identify (default: 5)
        segment_duration: Duration in seconds to analyze (default: 1.0s random segment).
                         Set to None to analyze full signal.
        random_seed: Random seed for reproducible segment selection (default: None = random)

    Returns:
        EnvelopeResult with peak information and diagnosis (optimized for chat display)
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes
sampling_rateNo
filter_lowNo
filter_highNo
num_peaksNo
segment_durationNo
random_seedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
num_samplesYesNumber of samples in envelope signal
sampling_rateYesSampling rate (Hz)
filter_bandYesBandpass filter band (Hz)
peak_frequenciesYesTop peak frequencies (Hz)
peak_magnitudesYesTop peak magnitudes
diagnosisYesInterpretive diagnosis text with bearing frequency analysis
spectrum_preview_freqNoFirst 100 freq points (Hz)
spectrum_preview_magNoFirst 100 magnitude points
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: the default random segment selection (1.0s), the output format (only peak info and diagnosis to avoid context overflow), the auto-detection of sampling rate and the need to provide it if missing, and the policy of not inferring from filenames. This is comprehensive and goes beyond basic expectations.

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 sections (purpose, algorithm, defaults, critical policies) and front-loaded with the main purpose. However, it is somewhat verbose, especially the repeated critical warnings about filename inference. A slightly more condensed version would improve conciseness without losing essential 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 complexity of the tool (7 parameters, no annotations, but an output schema), the description covers all necessary aspects: algorithm overview, default behaviors, critical policies, return value structure (peak info and diagnosis), and parameter validation details. It is complete and leaves no major gaps for an agent to misuse the tool.

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?

Schema description coverage is 0%, so the description carries the full burden. It adds rich meaning for all parameters: filename (opaque identifier), sampling_rate (auto-detect or unreliable), filter_low/filter_high (defaults and role), num_peaks (default), segment_duration (default and option for full signal), random_seed (reproducibility). This fully compensates for the lack of schema documentation.

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 verb ('Perform Envelope Analysis') and the resource ('to detect bearing faults'). It distinguishes this tool from siblings by specifying that it is for bearing fault detection using envelope analysis, which is a unique capability among the listed sibling tools.

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 provides explicit guidance on when to use the tool ('effective for detecting faults in ball/roller bearings'), how it works (high-pass filter, Hilbert transform, envelope spectrum), and critical policies (never infer from filename, base diagnosis on frequency-domain evidence). It also informs about parameter validation and user notification, leaving no ambiguity about usage.

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