Skip to main content
Glama
aldilaff
by aldilaff

wyze_get_scale_records

Retrieve weight measurement records from Wyze smart scales to track health metrics over time.

Instructions

Get weight measurement records from a Wyze scale

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_macNo
user_idNo
days_backNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'wyze_get_scale_records' tool. It fetches scale records using wyze-sdk's client.scales.get_records(), processes them into a list with weight, BMI, body fat, etc., and returns a structured response. Registered with the MCP server via the @mcp.tool() decorator. Input schema defined by function parameters: device_mac (optional str), user_id (optional str), days_back (int default 30).
    @mcp.tool()
    def wyze_get_scale_records(
        device_mac: str = None,
        user_id: str = None,
        days_back: int = 30
    ) -> Dict[str, Any]:
        """Get weight measurement records from a Wyze scale"""
        try:
            from datetime import datetime, timedelta
            
            client = get_wyze_client()
            
            # Calculate time range
            end_time = datetime.now()
            start_time = end_time - timedelta(days=days_back)
            
            records = client.scales.get_records(
                user_id=user_id,
                start_time=start_time,
                end_time=end_time
            )
            
            record_list = []
            for record in records:
                record_info = {
                    "measure_time": int(record.measure_ts) if hasattr(record, 'measure_ts') and record.measure_ts else None,
                    "weight": float(record.weight) if hasattr(record, 'weight') and record.weight is not None else None,
                    "bmi": float(record.bmi) if hasattr(record, 'bmi') and record.bmi is not None else None,
                    "body_fat": float(record.body_fat) if hasattr(record, 'body_fat') and record.body_fat is not None else None,
                    "muscle_mass": float(record.muscle) if hasattr(record, 'muscle') and record.muscle is not None else None,
                    "heart_rate": int(record.heart_rate) if hasattr(record, 'heart_rate') and record.heart_rate is not None else None,
                }
                record_list.append(record_info)
            
            return {
                "status": "success",
                "records": record_list,
                "count": len(record_list),
                "days_back": days_back
            }
        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)}"}
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 states the tool retrieves records but omits critical details like whether it's read-only, requires authentication, has rate limits, returns paginated data, or handles errors. This leaves significant gaps in understanding its operational behavior.

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, direct sentence that efficiently conveys the core purpose without unnecessary words. It is front-loaded and appropriately sized for a simple tool, making it easy to parse 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's moderate complexity (3 parameters, no annotations) and the presence of an output schema, the description is minimally adequate. It identifies the resource but lacks details on parameters, authentication, and behavioral traits. The output schema may cover return values, but the description should still address usage and constraints more fully.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no information about the three parameters ('device_mac', 'user_id', 'days_back'), such as their roles, formats, or interactions. This fails to provide meaningful context beyond the schema's basic titles.

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') and resource ('weight measurement records from a Wyze scale'), making the purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like 'wyze_get_scale_info' or 'wyze_get_scales', which might also retrieve scale-related data, leaving some ambiguity about scope.

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, such as 'wyze_get_scale_info' for metadata or 'wyze_get_scales' for device lists. It also lacks context on prerequisites, like whether authentication via 'wyze_login' is required, leaving usage unclear.

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