Skip to main content
Glama

disconnect_device

Disconnect from the currently connected PicoScope oscilloscope device. Use this tool to end your session with the measurement instrument when data acquisition is complete.

Instructions

Disconnect from the currently connected PicoScope device.

Returns: Dictionary containing disconnection status.

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The disconnect_device tool handler, decorated with @mcp.tool(). It checks if connected, calls device_manager.disconnect(), and returns appropriate status dictionary.
    @mcp.tool() def disconnect_device() -> dict[str, Any]: """Disconnect from the currently connected PicoScope device. Returns: Dictionary containing disconnection status. """ try: if not device_manager.is_connected(): return { "status": "warning", "message": "No device was connected", "connected": False, } success = device_manager.disconnect() if success: return { "status": "success", "message": "Device disconnected successfully", "connected": False, } else: return { "status": "error", "error": "Failed to disconnect device", } except Exception as e: return { "status": "error", "error": str(e), }
  • Invocation of register_discovery_tools(mcp) which defines and registers the disconnect_device tool along with other discovery tools.
    register_discovery_tools(mcp)

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