Skip to main content
Glama

measure_frequency

Measure signal frequency on oscilloscope channels to analyze waveform characteristics and timing parameters for electronic testing and debugging.

Instructions

Measure signal frequency on a channel.

Note: This requires a recent capture. Call capture_block first.

Args: channel: Channel to measure.

Returns: Dictionary containing frequency in Hz and measurement details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes

Implementation Reference

  • The core handler function for the 'measure_frequency' tool, decorated with @mcp.tool() for automatic registration. Handles channel validation, device connection checks, and provides guidance for usage (currently a placeholder implementation). Defines input schema via type hints.
    @mcp.tool() def measure_frequency(channel: Literal["A", "B", "C", "D"]) -> dict[str, Any]: """Measure signal frequency on a channel. Note: This requires a recent capture. Call capture_block first. Args: channel: Channel to measure. Returns: Dictionary containing frequency in Hz and measurement details. """ try: if not device_manager.is_connected(): return { "status": "error", "error": "No device connected", } # Check if channel is configured if channel not in device_manager.channel_configs: return { "status": "error", "error": f"Channel {channel} not configured. Configure and capture first.", } # For now, we need to guide the user to capture data first # In a real implementation, we might store the last capture return { "status": "info", "message": "To measure frequency: 1) Configure channel, 2) Set trigger, 3) Capture block, then extract frequency from captured data", "channel": channel, } except Exception as e: return { "status": "error", "error": str(e), "channel": channel, }
  • Explicit registration call that invokes the analysis tools registration, which includes the measure_frequency tool.
    register_analysis_tools(mcp)
  • Import of the registration function for analysis tools containing measure_frequency.
    from .tools.analysis import register_analysis_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/markuskreitzer/picoscope_mcp'

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