measure_pulse_width
Measure pulse width at a specified threshold on PicoScope oscilloscope channels to analyze signal timing characteristics.
Instructions
Measure pulse width at specified threshold.
Args: channel: Channel to measure. threshold_percent: Threshold percentage for pulse measurement (0-100).
Returns: Dictionary containing pulse width in seconds.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| threshold_percent | No |
Implementation Reference
- The handler function for the 'measure_pulse_width' tool, decorated with @mcp.tool() for registration. Includes input schema via type hints and a stub implementation.@mcp.tool() def measure_pulse_width( channel: Literal["A", "B", "C", "D"], threshold_percent: float = 50.0 ) -> dict[str, Any]: """Measure pulse width at specified threshold. Args: channel: Channel to measure. threshold_percent: Threshold percentage for pulse measurement (0-100). Returns: Dictionary containing pulse width in seconds. """ # TODO: Implement pulse width measurement return { "status": "not_implemented", "channel": channel, "threshold": threshold_percent, }
- src/picoscope_mcp/server.py:8-18 (registration)Imports and calls register_analysis_tools(mcp), which registers the analysis tools including 'measure_pulse_width'.from .tools.analysis import register_analysis_tools from .tools.advanced import register_advanced_tools # Create FastMCP server instance mcp = FastMCP("PicoScope MCP Server") # Register all tool categories register_discovery_tools(mcp) register_configuration_tools(mcp) register_acquisition_tools(mcp) register_analysis_tools(mcp)