get_channel_config
Retrieve current configuration settings for a specific channel (A, B, C, or D) on a PicoScope oscilloscope to view or verify signal acquisition parameters.
Instructions
Get current configuration of a channel.
Args: channel: Channel identifier (A, B, C, or D).
Returns: Dictionary containing current channel settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes |
Implementation Reference
- The handler function for the 'get_channel_config' tool. It retrieves the current channel configuration from the device_manager if connected and the channel is configured, returning success or error status.def get_channel_config(channel: Literal["A", "B", "C", "D"]) -> dict[str, Any]: """Get current configuration of a channel. Args: channel: Channel identifier (A, B, C, or D). Returns: Dictionary containing current channel settings. """ try: if not device_manager.is_connected(): return { "status": "error", "error": "No device connected", } # Get channel config from device manager if channel in device_manager.channel_configs: config = device_manager.channel_configs[channel] return { "status": "success", "channel": channel, "enabled": config.enabled, "coupling": config.coupling.value, "voltage_range": config.voltage_range, "analog_offset": config.analog_offset, } else: return { "status": "error", "error": f"Channel {channel} not configured", "channel": channel, } except Exception as e: return { "status": "error", "error": str(e), "channel": channel, }
- src/picoscope_mcp/server.py:15-19 (registration)Registers the configuration tools (including get_channel_config) by calling register_configuration_tools(mcp). This is the top-level registration in the MCP server.register_discovery_tools(mcp) register_configuration_tools(mcp) register_acquisition_tools(mcp) register_analysis_tools(mcp) register_advanced_tools(mcp)
- src/picoscope_mcp/tools/configuration.py:8-8 (registration)The function that defines and registers the configuration tools using @mcp.tool() decorators, including get_channel_config.def register_configuration_tools(mcp: Any) -> None: