get_statistics
Analyze signal data from PicoScope oscilloscopes to calculate statistical metrics including minimum, maximum, mean, and standard deviation values.
Instructions
Get statistical analysis of signal.
Args: channel: Channel to analyze. num_samples: Number of samples to analyze.
Returns: Dictionary containing min, max, mean, std dev, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| num_samples | No |
Implementation Reference
- The handler function for the 'get_statistics' MCP tool. Defined as a nested function within register_analysis_tools and decorated with @mcp.tool(). Includes parameter type hints serving as input schema and a stub implementation.@mcp.tool() def get_statistics( channel: Literal["A", "B", "C", "D"], num_samples: int = 1000 ) -> dict[str, Any]: """Get statistical analysis of signal. Args: channel: Channel to analyze. num_samples: Number of samples to analyze. Returns: Dictionary containing min, max, mean, std dev, etc. """ # TODO: Implement statistics calculation return {"status": "not_implemented", "channel": channel, "num_samples": num_samples}
- src/picoscope_mcp/server.py:18-18 (registration)The registration point where register_analysis_tools is called on the MCP server instance, thereby registering the 'get_statistics' tool along with other analysis tools.register_analysis_tools(mcp)
- src/picoscope_mcp/server.py:8-8 (registration)Import of register_analysis_tools from analysis.py, prerequisite for registering the tools including 'get_statistics'.from .tools.analysis import register_analysis_tools