Skip to main content
Glama

get_heart_rate

Retrieve heart rate measurements from Withings devices within a specified time period to monitor cardiovascular health trends.

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

  • The handler function _get_heart_rate that constructs API parameters and calls the Withings measure endpoint with 'getintradayactivity' action to retrieve heart rate measurements.
    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"]) return await self._make_request("/v2/measure", params)
  • Input schema defining the parameters for the get_heart_rate tool: optional startdate and enddate as strings.
    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 registration in list_tools() decorator, specifying name, description, and input schema for get_heart_rate.
    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", }, }, }, ),

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

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