Skip to main content
Glama
markuskreitzer

PicoScope MCP Server

start_streaming

Initiates real-time data acquisition from PicoScope oscilloscopes with configurable sampling intervals, buffer sizes, and capture duration for continuous or limited signal streaming.

Instructions

Start streaming data acquisition.

Args: sample_interval_ns: Sample interval in nanoseconds. buffer_size: Size of streaming buffer. auto_stop: Whether to automatically stop after max_samples. max_samples: Maximum samples to capture (0 = continuous).

Returns: Dictionary containing streaming status and configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sample_interval_nsYes
buffer_sizeNo
auto_stopNo
max_samplesNo

Implementation Reference

  • The MCP tool handler for 'start_streaming'. Decorated with @mcp.tool(), defines input schema via type hints, and contains the core logic (currently stubbed with TODO).
    @mcp.tool()
    def start_streaming(
        sample_interval_ns: int,
        buffer_size: int = 100000,
        auto_stop: bool = False,
        max_samples: int = 0,
    ) -> dict[str, Any]:
        """Start streaming data acquisition.
    
        Args:
            sample_interval_ns: Sample interval in nanoseconds.
            buffer_size: Size of streaming buffer.
            auto_stop: Whether to automatically stop after max_samples.
            max_samples: Maximum samples to capture (0 = continuous).
    
        Returns:
            Dictionary containing streaming status and configuration.
        """
        # TODO: Implement streaming mode
        return {
            "status": "not_implemented",
            "sample_interval_ns": sample_interval_ns,
            "buffer_size": buffer_size,
        }
  • Top-level registration call in the main server file that invokes register_acquisition_tools(mcp), thereby registering the 'start_streaming' tool among others.
    register_acquisition_tools(mcp)
  • Supporting method in the device manager class intended for the actual streaming implementation, called potentially from the tool handler.
    def start_streaming(
        self, sample_interval_ns: int, buffer_size: int
    ) -> bool:
        """Start streaming mode.
    
        Args:
            sample_interval_ns: Sample interval in nanoseconds.
            buffer_size: Buffer size for streaming.
    
        Returns:
            True if successful, False otherwise.
        """
        if not self.is_connected():
            return False
    
        # TODO: Implement streaming mode
        # This will need to set up buffers and call ps*RunStreaming
    
        return True

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