Skip to main content
Glama
Schimmilab

Withings MCP Server

by Schimmilab

get_activity

Retrieve daily activity data including steps, calories, distance, and elevation for a date range or since a specific timestamp.

Instructions

Get daily activity data (steps, calories, distance, elevation)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startdateymdNoStart date in YYYY-MM-DD format
enddateymdNoEnd date in YYYY-MM-DD format
lastupdateNoGet activities modified since this timestamp

Implementation Reference

  • Tool registration with name='get_activity' in the list_tools handler, defining input schema with optional startdateymd, enddateymd, and lastupdate parameters.
    Tool(
        name="get_activity",
        description="Get daily activity data (steps, calories, distance, elevation)",
        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",
                },
                "lastupdate": {
                    "type": "string",
                    "description": "Get activities modified since this timestamp",
                },
            },
        },
    ),
  • Call routing: dispatches 'get_activity' calls to the _get_activity method in the call_tool handler.
    elif name == "get_activity":
        result = await self._get_activity(arguments)
  • Handler implementation: calls Withings API endpoint /v2/measure with action=getactivity, passing startdateymd, enddateymd, and lastupdate parameters.
    async def _get_activity(self, args: dict) -> dict:
        """Get activity data."""
        params = {"action": "getactivity"}
    
        if "startdateymd" in args:
            params["startdateymd"] = args["startdateymd"]
        if "enddateymd" in args:
            params["enddateymd"] = args["enddateymd"]
        if "lastupdate" in args:
            params["lastupdate"] = self._parse_date(args["lastupdate"])
    
        return await self._make_request("/v2/measure", params)
  • Input schema for get_activity tool: all properties are optional strings (startdateymd, enddateymd, lastupdate).
    Tool(
        name="get_activity",
        description="Get daily activity data (steps, calories, distance, elevation)",
        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",
                },
                "lastupdate": {
                    "type": "string",
                    "description": "Get activities modified since this timestamp",
                },
            },
        },
    ),
  • Makes the actual API call to Withings /v2/measure endpoint with action=getactivity; also uses _parse_date helper for lastupdate parameter conversion.
    async def _get_activity(self, args: dict) -> dict:
        """Get activity data."""
        params = {"action": "getactivity"}
    
        if "startdateymd" in args:
            params["startdateymd"] = args["startdateymd"]
        if "enddateymd" in args:
            params["enddateymd"] = args["enddateymd"]
        if "lastupdate" in args:
            params["lastupdate"] = self._parse_date(args["lastupdate"])
    
        return await self._make_request("/v2/measure", params)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavioral traits such as data range limits, authentication needs, rate limits, or whether data is aggregated per day. Only the data types are listed.

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?

Single sentence, no redundant information. Front-loaded with the tool's purpose. Every word is necessary.

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?

Without annotations or output schema, the description is minimal. It lacks details on return format, pagination, or any constraints. For a 3-parameter tool, more context is needed.

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?

Schema coverage is 100%, with all parameters described. The description does not add further meaning beyond the schema (e.g., that 'startdateymd' and 'enddateymd' define the range, or that 'lastupdate' filters by modification time). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'daily activity data', and lists specific data types (steps, calories, distance, elevation). This distinguishes it from sibling tools like get_heart_rate or get_sleep_details.

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 guidance on when to use this tool versus alternatives (e.g., get_workouts, get_heart_rate). No conditions, prerequisites, or exclusions are mentioned.

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