Skip to main content
Glama

get_heart_rate

Retrieve heart rate measurements from Withings devices for 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 main handler function for the 'get_heart_rate' tool. It constructs parameters for the Withings API endpoint '/v2/measure' with action='getintradayactivity' and calls the authenticated request method.
    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)
  • Registration of the 'get_heart_rate' tool in the list_tools() handler, including its name, description, and input schema definition.
    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", }, }, }, ),
  • Dispatch logic in the call_tool() method that routes calls to the 'get_heart_rate' tool to its specific handler.
    elif name == "get_heart_rate": result = await self._get_heart_rate(arguments)

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