Skip to main content
Glama
Schimmilab

Withings MCP Server

by Schimmilab

get_user_info

Fetch user account details and profile information from Withings for integration with health data.

Instructions

Get user information from Withings account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler function that executes the tool logic. Calls _make_request to Withings API endpoint /v2/user with action=getdevice.
    async def _get_user_info(self) -> dict:
        """Get user information."""
        return await self._make_request("/v2/user", {"action": "getdevice"})
  • The tool registration with input schema (empty properties, no parameters required).
    Tool(
        name="get_user_info",
        description="Get user information from Withings account",
        inputSchema={
            "type": "object",
            "properties": {},
        },
  • The call_tool handler that dispatches the 'get_user_info' name to the _get_user_info method.
    if name == "get_user_info":
        result = await self._get_user_info()
  • The _make_request helper that performs authenticated HTTP GET requests to the Withings API, with automatic token refresh on 401.
    async def _make_request(self, endpoint: str, params: dict, retry_on_401: bool = True) -> dict:
        """Make authenticated request to Withings API."""
        headers = self.auth.get_headers()
        async with httpx.AsyncClient() as client:
            response = await client.get(
                f"{self.base_url}{endpoint}",
                headers=headers,
                params=params,
            )
    
            # Don't raise for status yet - check for 401 first
            data = response.json()
    
            # Handle 401 - token expired, try refresh and retry once
            if data.get("status") == 401 and retry_on_401:
                await self.auth.refresh_access_token()
                # Retry the request with new token
                return await self._make_request(endpoint, params, retry_on_401=False)
    
            # Check for other API errors
            if data.get("status") != 0:
                raise Exception(f"API error: {data}")
    
            return data.get("body", {})
Behavior3/5

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

No annotations are provided. The description indicates a read operation but does not disclose authentication requirements, data freshness, or what specific information is returned.

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 concise sentence that directly states the tool's purpose with no extraneous information.

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

Completeness4/5

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

Given no parameters and low complexity, the description is largely sufficient. However, without an output schema, an agent might not know what data to expect.

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

Parameters4/5

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

Input schema has no parameters, so the description need not add param details. It mentions 'user information' generally, but omits specifics about what fields are included.

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 identifies the action (get) and resource (user information from Withings account). It distinguishes from sibling tools like get_activity, get_heart_rate, etc., which target specific data types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving general user profile data, but does not explicitly state when to use this over alternatives or mention prerequisites like authentication.

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