Skip to main content
Glama

get_workouts

Retrieve workout and training session data from Withings Health API for specified date ranges to track fitness progress and analyze exercise patterns.

Instructions

Get workout/training sessions data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startdateymdNoStart date in YYYY-MM-DD format
enddateymdNoEnd date in YYYY-MM-DD format

Implementation Reference

  • The main handler function `_get_workouts` that constructs API parameters and calls the Withings API to retrieve workout sessions data.
    async def _get_workouts(self, args: dict) -> dict: """Get workout data.""" params = {"action": "getworkouts"} if "startdateymd" in args: params["startdateymd"] = args["startdateymd"] if "enddateymd" in args: params["enddateymd"] = args["enddateymd"] return await self._make_request("/v2/measure", params)
  • The input schema definition for the `get_workouts` tool, specifying optional date range parameters.
    Tool( name="get_workouts", description="Get workout/training sessions data", inputSchema={ "type": "object", "properties": { "startdateymd": { "type": "string", "description": "Start date in YYYY-MM-DD format", }, "enddateymd": { "type": "string", "description": "End date in YYYY-MM-DD format", }, }, }, ),
  • Tool dispatch registration in the `call_tool` method that maps the tool name to its handler.
    elif name == "get_workouts": result = await self._get_workouts(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