get_device_status
Check LG ThinQ device status to monitor operational state and current performance metrics for home appliances.
Instructions
Retrieves status information for a specific device Args: device_id: Unique ID of the device to query
Returns:
String containing device status information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes |
Implementation Reference
- thinqconnect_mcp/server.py:91-101 (registration)Registration and handler for the MCP tool 'get_device_status'. Includes schema via args annotation and description string. Delegates execution to the helper in tools.py.@mcp.tool( description="""Retrieves status information for a specific device Args: device_id: Unique ID of the device to query Returns: String containing device status information """ ) async def get_device_status(device_id: str) -> str: return await tools.get_device_status(thinq_api=thinq_api, device_id=device_id)
- thinqconnect_mcp/tools.py:318-332 (helper)Helper function implementing the core logic for retrieving and formatting device status using ThinQApi.async def get_device_status(thinq_api: ThinQApi, device_id: str) -> str: """ Retrieve status information for a specific device. """ try: thinq_api._session = ClientSession() device_status = await thinq_api.async_get_device_status(device_id=device_id) return f"""Device status information is as follows. Please relay appropriately to the user. ## Status Information {device_status} """ except Exception as e: return f"An error occurred while retrieving device status: {str(e)}"