Skip to main content
Glama
thinq-connect

ThinQ Connect MCP Server

Official

get_device_list

Retrieve a list of all connected LG ThinQ devices to view and manage your smart home inventory.

Instructions

Retrieves a list of all devices connected to the ThinQ Connect platform Args: None

Returns:
    String containing connected device list information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP handler function for the 'get_device_list' tool, registered with @mcp.tool decorator. It takes no arguments and returns a formatted string of devices by delegating to the tools module helper.
    @mcp.tool(
        description="""Retrieves a list of all devices connected to the ThinQ Connect platform
        Args:
            None
    
        Returns:
            String containing connected device list information
        """
    )
    async def get_device_list() -> str:
        return await tools.get_device_list(thinq_api=thinq_api)
  • Supporting helper function that implements the core logic: initializes session, caches and retrieves device list from ThinQApi, formats into a human-readable string with device details.
    async def get_device_list(thinq_api: ThinQApi) -> List[str]:
        """
        Get device list
        """
        global local_device_lists
        try:
            thinq_api._session = ClientSession()
            if not local_device_lists:
                devices = await thinq_api.async_get_device_list()
                local_device_lists = devices
            else:
                devices = local_device_lists
            device_info = []
            for device in devices:
                device_info.append(
                    f"Device ID: {device.get('deviceId')}\n"
                    f"Device Name: {device.get('deviceInfo').get('alias')}\n"
                    f"Device Type: {device.get('deviceInfo').get('deviceType')}\n"
                    f"Model Name: {device.get('deviceInfo').get('modelName')}\n"
                )
            header = f"Found {len(devices)} devices:\n\n"
            return header + "\n".join(device_info)
    
        except Exception as e:
            return f"An error occurred while retrieving device list: {str(e)}"

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/thinq-connect/thinqconnect-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server