Skip to main content
Glama
aldilaff
by aldilaff

wyze_get_devices

Retrieve a comprehensive list of all Wyze smart home devices linked to your account for monitoring and management.

Instructions

Get list of all Wyze devices associated with the account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the wyze_get_devices tool logic. It retrieves the list of Wyze devices using the SDK, extracts relevant info, and returns formatted data or error messages.
    @mcp.tool()
    def wyze_get_devices() -> Dict[str, Any]:
        """Get list of all Wyze devices associated with the account"""
        try:
            client = get_wyze_client()
            devices = client.devices_list()
            
            device_list = []
            for device in devices:
                device_info = {
                    "mac": str(device.mac) if device.mac else "Unknown",
                    "nickname": str(device.nickname) if device.nickname else "Unknown",
                    "product_model": str(getattr(device, 'product_model', 'Unknown')) if getattr(device, 'product_model', 'Unknown') else "Unknown",
                    "product_type": str(getattr(device, 'product_type', 'Unknown')) if getattr(device, 'product_type', 'Unknown') else "Unknown",
                    "is_online": bool(getattr(device, 'is_online', True)),
                    "firmware_ver": str(getattr(device, 'firmware_ver', 'N/A')),
                }
                device_list.append(device_info)
            
            return {
                "status": "success",
                "devices": device_list,
                "count": len(device_list)
            }
        except WyzeClientConfigurationError as e:
            return {"status": "error", "message": f"Configuration error: {str(e)}"}
        except WyzeRequestError as e:
            return {"status": "error", "message": f"API error: {str(e)}"}
        except Exception as e:
            return {"status": "error", "message": f"Unexpected error: {str(e)}"}
  • Helper function that initializes and returns the global Wyze SDK client instance using environment variables for authentication. Called by wyze_get_devices.
    def get_wyze_client() -> Client:
        """Get or create Wyze client instance with auto-login if credentials available"""
        global _wyze_client
        
        if _wyze_client is None:
            # Get credentials from environment
            email = os.getenv("WYZE_EMAIL")
            password = os.getenv("WYZE_PASSWORD")
            key_id = os.getenv("WYZE_KEY_ID")
            api_key = os.getenv("WYZE_API_KEY")
            
            if not all([email, password, key_id, api_key]):
                raise WyzeClientConfigurationError(
                    "Missing required environment variables: WYZE_EMAIL, WYZE_PASSWORD, WYZE_KEY_ID, WYZE_API_KEY"
                )
            
            _wyze_client = Client(
                email=email,
                password=password,
                key_id=key_id,
                api_key=api_key
            )
        
        return _wyze_client
  • The @mcp.tool() decorator registers the wyze_get_devices function as an MCP tool.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Get list') but does not mention any behavioral traits such as authentication requirements, rate limits, pagination, or what 'associated with the account' entails (e.g., permissions or scope). This leaves significant gaps for a tool that likely interacts with user data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any unnecessary words or fluff. It is front-loaded and efficiently communicates the core function, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description's job is reduced. However, it lacks details on behavioral aspects like authentication or data scope, which are important for a tool that retrieves account-associated devices. The output schema may cover return values, but the description could benefit from more context on usage or limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so no parameter information is needed in the description. The description does not add any parameter semantics, but this is acceptable given the lack of parameters, aligning with the baseline for 0 parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('list of all Wyze devices'), making the purpose specific and understandable. However, it does not distinguish this tool from sibling tools like 'wyze_device_info' or 'wyze_get_device_status', which might have overlapping or similar functions, so it lacks explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'wyze_device_info' and 'wyze_get_device_status', it's unclear if this tool is for a comprehensive list, summary information, or something else, leaving the agent without usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/aldilaff/mcp-wyze-server'

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