export_waveform
Save captured oscilloscope waveform data to files in CSV, JSON, or NumPy formats for analysis and sharing.
Instructions
Export captured waveform data to file.
Args: format: Export format (csv, json, or numpy). channels: List of channels to export. filename: Output filename (without extension).
Returns: Dictionary containing export status and file path.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channels | No | ||
| filename | No | waveform | |
| format | No | csv |
Implementation Reference
- The primary handler for the 'export_waveform' tool. Includes inline schema via type hints for parameters (format, channels, filename) and return type. The logic is a placeholder (TODO). Decorated with @mcp.tool() for registration.@mcp.tool() def export_waveform( format: Literal["csv", "json", "numpy"] = "csv", channels: list[str] = ["A"], filename: str = "waveform", ) -> dict[str, Any]: """Export captured waveform data to file. Args: format: Export format (csv, json, or numpy). channels: List of channels to export. filename: Output filename (without extension). Returns: Dictionary containing export status and file path. """ # TODO: Implement waveform export return { "status": "not_implemented", "format": format, "channels": channels, "filename": filename, }
- src/picoscope_mcp/server.py:19-19 (registration)The call to register_advanced_tools(mcp) in the main server setup, which triggers the definition and registration of the export_waveform tool.register_advanced_tools(mcp)
- src/picoscope_mcp/server.py:9-9 (registration)Import of the register_advanced_tools function from tools.advanced, necessary for registering the advanced tools including export_waveform.from .tools.advanced import register_advanced_tools
- The function signature defining the input schema (parameters with types and defaults) and output type for the export_waveform tool.def export_waveform( format: Literal["csv", "json", "numpy"] = "csv", channels: list[str] = ["A"], filename: str = "waveform", ) -> dict[str, Any]: