Skip to main content
Glama
Schimmilab

Withings MCP Server

by Schimmilab

get_heart_rate

Retrieve heart rate measurements for a specified time period using start and end dates.

Instructions

Get heart rate measurements over a time period

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startdateNoStart date (YYYY-MM-DD) or Unix timestamp
enddateNoEnd date (YYYY-MM-DD) or Unix timestamp

Implementation Reference

  • Tool registration (schema + name/description) for 'get_heart_rate' tool, defined in the list_tools() handler. Input schema accepts optional 'startdate' and 'enddate' string parameters.
    Tool(
        name="get_heart_rate",
        description="Get heart rate measurements over a time period",
        inputSchema={
            "type": "object",
            "properties": {
                "startdate": {
                    "type": "string",
                    "description": "Start date (YYYY-MM-DD) or Unix timestamp",
                },
                "enddate": {
                    "type": "string",
                    "description": "End date (YYYY-MM-DD) or Unix timestamp",
                },
            },
        },
  • Tool call routing: the call_tool() handler dispatches name 'get_heart_rate' to the _get_heart_rate() method.
    elif name == "get_heart_rate":
        result = await self._get_heart_rate(arguments)
  • Actual handler implementation: _get_heart_rate() method calls the Withings API endpoint /v2/measure with action 'getintradayactivity', passing optional startdate and enddate parameters.
    async def _get_heart_rate(self, args: dict) -> dict:
        """Get heart rate data."""
        params = {"action": "getintradayactivity"}
    
        if "startdate" in args:
            params["startdate"] = self._parse_date(args["startdate"])
        if "enddate" in args:
            params["enddate"] = self._parse_date(args["enddate"], end_of_day=True)
    
        return await self._make_request("/v2/measure", params)
Behavior2/5

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

Without annotations, the description bears full burden for behavioral traits. It fails to disclose important details such as data granularity, time zone handling, potential rate limits, or what happens if dates are missing. The description only implies time-range scoping.

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

Conciseness4/5

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

The description is concise—one sentence with nine words. It is front-loaded with the core action. However, it may be too terse at the expense of completeness.

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

Completeness2/5

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

Given no output schema, the description should clarify what the tool returns (e.g., list of records, timestamps, units). It does not. The tool is simple but lacks details on default behavior, edge cases, or data structure, leaving the agent underinformed.

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

Parameters3/5

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

Input schema provides 100% coverage with descriptions for 'startdate' and 'enddate'. The description adds no additional meaning beyond the schema, just 'over a time period'. Baseline score of 3 is appropriate as schema already documents 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 tool retrieves heart rate measurements over a time period. The verb 'Get' and resource 'heart rate measurements' are specific. However, it does not differentiate from siblings like 'get_measurements' which might overlap, and lacks detail on the type of measurements (e.g., minute-by-minute, average).

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?

No usage guidance is provided. The description does not indicate when to use this tool over alternatives (e.g., get_activity, get_measurements), nor does it mention prerequisites or contexts like activity tracking vs. resting state.

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/Schimmilab/withings-mcp-server'

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