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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"channel": "<channel>"
},
"name": "measure_pulse_width"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| threshold_percent | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
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)