Skip to main content
Glama
aldilaff
by aldilaff

wyze_get_scales

Retrieve all Wyze smart scales linked to your account for health tracking and device management.

Instructions

Get list of all Wyze scales associated with the account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler function for the wyze_get_scales tool, decorated with @mcp.tool() for automatic registration in the FastMCP server. It fetches all Wyze scales using the SDK, extracts key information like MAC, nickname, model, online status, and firmware, then returns a formatted list with count and status.
    @mcp.tool()
    def wyze_get_scales() -> Dict[str, Any]:
        """Get list of all Wyze scales associated with the account"""
        try:
            client = get_wyze_client()
            scales = client.scales.list()
            
            scale_list = []
            for scale in scales:
                scale_info = {
                    "mac": str(scale.mac) if scale.mac else "Unknown",
                    "nickname": str(scale.nickname) if scale.nickname else "Unknown",
                    "product_model": str(getattr(scale, 'product_model', 'Unknown')) if getattr(scale, 'product_model', 'Unknown') else "Unknown",
                    "product_type": str(getattr(scale, 'product_type', 'Scale')) if getattr(scale, 'product_type', 'Scale') else "Scale",
                    "is_online": bool(getattr(scale, 'is_online', True)),
                    "firmware_ver": str(getattr(scale, 'firmware_ver', 'N/A')),
                }
                scale_list.append(scale_info)
            
            return {
                "status": "success",
                "scales": scale_list,
                "count": len(scale_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)}"}
  • Shared helper function used by wyze_get_scales (and other tools) to obtain the authenticated Wyze Client instance from environment variables.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves a list but doesn't describe what the list contains (e.g., scale IDs, names), whether it requires authentication, how it handles errors, or if there are rate limits. 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 efficiently conveys the core function without unnecessary words. It is front-loaded with the main action and resource, making it easy to parse and understand quickly.

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 has 0 parameters, an output schema exists (which should detail the return values), and no annotations, the description is minimally adequate. However, for a tool that likely requires authentication and returns user-specific data, the description could benefit from mentioning prerequisites or the nature of the output, leaving room for improvement despite the structured support.

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 input schema has 100% description coverage (though empty). The description doesn't need to add parameter details, so it appropriately focuses on the tool's purpose without redundancy. A baseline of 4 is suitable as no parameters exist to document.

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 ('Get list') and resource ('all Wyze scales associated with the account'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'wyze_get_scale_info' or 'wyze_get_scale_records', which might retrieve specific scale data rather than a list of all scales.

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. It doesn't mention prerequisites (e.g., needing to log in first), compare it to siblings like 'wyze_get_devices' (which might include scales), or specify contexts where this tool is preferred over others.

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