Skip to main content
Glama
LGDiMaggio

Predictive Maintenance MCP Server

by LGDiMaggio

plot_spectrum

Generate interactive FFT spectrum plots with automatic peak detection to identify frequency peaks and harmonics from vibration signals for machinery fault diagnosis.

Instructions

    Generate interactive FFT spectrum plot with automatic peak detection.

    Creates an interactive HTML plot showing the frequency spectrum up to Nyquist frequency (Fs/2).
    Automatically identifies and labels the most significant peaks. If rotation frequency is provided,
    identifies harmonics as 1x, 2x, 3x RPM.

    Args:
        signal_file: Name of the CSV file in data/signals/
        sampling_rate: Sampling frequency in Hz (default: 10000)
        freq_range: [min_freq, max_freq] to limit the plot range (default: [0, Fs/2])
        num_peaks: Number of peaks to identify and label (default: 10)
        min_peak_distance: Minimum distance between peaks in Hz (default: 1.0)
        rotation_freq: Rotation frequency in Hz for RPM harmonic labeling (optional)
        title: Custom plot title (optional)
        ctx: MCP context for progress/logging

    Returns:
        Path to generated HTML file with peak information

    Example:
        plot_spectrum(
            "bearing_signal.csv",
            sampling_rate=10000,
            rotation_freq=25.0,  # 1500 RPM = 25 Hz
            num_peaks=15
        )
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
signal_fileYes
sampling_rateNo
freq_rangeNo
num_peaksNo
min_peak_distanceNo
rotation_freqNo
titleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. Explains plot generation, peak labeling, harmonic identification, and use of MCP context for progress/logging. Lacks details on error handling or file overwrite behavior.

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

Conciseness5/5

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

Well-structured with summary, args, returns, and example. Front-loaded with main purpose. Every sentence adds value without verbosity.

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

Completeness4/5

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

Covers all parameters, output (path to HTML file with peak information), and provides an example. Does not address error cases or file size limits, but sufficient for agent selection.

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%, but the description provides thorough explanations for all 7 parameters, including defaults and units (Hz). Adds significant meaning beyond the bare schema.

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?

Clearly states the tool generates an interactive FFT spectrum plot with automatic peak detection, specifying Nyquist frequency and optional harmonic labeling. Distinguished from siblings like plot_envelope and plot_signal.

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

Usage Guidelines3/5

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

Description mentions rotation frequency for harmonics, implying use for rotating machinery, but no explicit guidance on when to use vs alternatives like plot_envelope or analyze_fft.

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