Skip to main content
Glama

measure_thd

Measure Total Harmonic Distortion (THD) percentage and harmonic components on PicoScope oscilloscope channels to analyze signal purity and identify distortion issues.

Instructions

Measure Total Harmonic Distortion (THD).

Args: channel: Channel to measure.

Returns: Dictionary containing THD percentage and harmonic components.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelYes

Implementation Reference

  • The handler function for the 'measure_thd' tool, decorated with @mcp.tool(). It currently returns a 'not_implemented' status as a stub implementation.
    @mcp.tool() def measure_thd(channel: Literal["A", "B", "C", "D"]) -> dict[str, Any]: """Measure Total Harmonic Distortion (THD). Args: channel: Channel to measure. Returns: Dictionary containing THD percentage and harmonic components. """ # TODO: Implement THD measurement return {"status": "not_implemented", "channel": channel}
  • Registration of analysis tools (including measure_thd) via call to register_analysis_tools(mcp) in the main server setup.
    # Register all tool categories register_discovery_tools(mcp) register_configuration_tools(mcp) register_acquisition_tools(mcp) register_analysis_tools(mcp) register_advanced_tools(mcp)
  • Function that registers all analysis tools, including measure_thd, by defining them with @mcp.tool() decorators inside it.
    def register_analysis_tools(mcp: Any) -> None: """Register signal analysis tools with the MCP server."""

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