Skip to main content
Glama
aldilaff
by aldilaff

wyze_login

Authenticate with your Wyze account to enable control and monitoring of smart home devices through the MCP server.

Instructions

Login to Wyze account using environment variables

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'wyze_login' tool. It calls get_wyze_client() to login using environment variables WYZE_EMAIL, WYZE_PASSWORD, WYZE_KEY_ID, WYZE_API_KEY and returns success/error status.
    @mcp.tool()
    def wyze_login() -> Dict[str, str]:
        """Login to Wyze account using environment variables"""
        try:
            client = get_wyze_client()
            return {"status": "success", "message": "Successfully logged in to Wyze"}
        except WyzeClientConfigurationError as e:
            return {"status": "error", "message": f"Configuration error: {str(e)}"}
        except Exception as e:
            return {"status": "error", "message": f"Unexpected error: {str(e)}"}
  • The @mcp.tool() decorator registers the wyze_login function as an MCP tool.
    @mcp.tool()
  • Supporting helper function that creates and caches the Wyze Client instance using environment variables, used by wyze_login and other tools.
    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
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'using environment variables' for login, which hints at credential handling, but fails to describe key traits like whether this creates a session, requires specific permissions, has rate limits, or what happens on failure. This is inadequate for a login tool with zero annotation coverage.

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, efficient sentence that directly states the tool's purpose and method without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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 the tool's complexity (authentication with 0 parameters) and the presence of an output schema (which likely handles return values), the description is minimally adequate. However, it lacks details on behavioral aspects like session management or error handling, which are crucial for a login tool, leaving gaps in completeness.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds value by specifying 'using environment variables,' which clarifies the authentication method beyond the schema. This earns a baseline 4 for effectively compensating with contextual information.

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 action ('Login') and target ('Wyze account'), providing a specific verb+resource combination. However, it doesn't differentiate from siblings like 'wyze_device_info' or 'wyze_get_devices' in terms of authentication scope or timing, which keeps it from a perfect score.

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

Usage Guidelines3/5

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

The description implies usage ('using environment variables') for authentication, suggesting it's needed before other tools that interact with Wyze devices. However, it lacks explicit guidance on when to use it versus alternatives (e.g., if other tools handle login internally) or clear exclusions, leaving some ambiguity.

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