list_devices
Discover and identify all connected PicoScope oscilloscopes to enable signal acquisition, measurement, and analysis through natural language commands.
Instructions
List all connected PicoScope devices.
Returns: Dictionary containing list of discovered devices with their info.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function for the 'list_devices' tool. It discovers connected PicoScope devices using device_manager.discover_devices() and returns a dictionary with status, devices list, and count, handling exceptions.def list_devices() -> dict[str, Any]: """List all connected PicoScope devices. Returns: Dictionary containing list of discovered devices with their info. """ try: devices = device_manager.discover_devices() return { "status": "success", "devices": devices, "count": len(devices), } except Exception as e: return { "status": "error", "error": str(e), "devices": [], "count": 0, }
- src/picoscope_mcp/server.py:15-15 (registration)Registration call to register_discovery_tools(mcp), which defines and registers the list_devices tool using @mcp.tool() decorator.register_discovery_tools(mcp)
- src/picoscope_mcp/tools/discovery.py:10-11 (registration)The @mcp.tool() decorator that registers the list_devices function as an MCP tool.@mcp.tool() def list_devices() -> dict[str, Any]: