Skip to main content
Glama
Marholoubek

Health MCP Server

by Marholoubek

list_adapters

List all configured health data adapters and view their authentication status to manage integrations.

Instructions

List all available health data adapters and their authentication status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the list_adapters tool. It calls config.get_adapter_status() to get status of all adapters (whoop, strava), checks authentication status for enabled adapters, and formats a markdown response showing enabled/disabled/not-configured status for each adapter.
    async def _handle_list_adapters(self, args: dict) -> list[TextContent]:
        """Handle list_adapters tool call."""
        status = self.config.get_adapter_status()
        
        lines = [
            "## Health Data Adapters",
            "",
        ]
        
        for adapter_name, info in status.items():
            enabled = info["enabled"]
            configured = info["configured"]
            
            if enabled:
                # Check authentication status
                adapter = getattr(self, adapter_name, None)
                if adapter:
                    try:
                        is_auth = await adapter.is_authenticated()
                        auth_status = "✅ Authenticated" if is_auth else "⚠️ Not authenticated"
                    except Exception:
                        auth_status = "❓ Unknown"
                else:
                    auth_status = "❌ Not initialized"
                
                lines.append(f"### {adapter_name.title()}")
                lines.append(f"- Status: **Enabled**")
                lines.append(f"- Auth: {auth_status}")
            elif configured:
                lines.append(f"### {adapter_name.title()}")
                lines.append(f"- Status: **Disabled** (credentials configured but explicitly disabled)")
            else:
                lines.append(f"### {adapter_name.title()}")
                lines.append(f"- Status: **Not configured**")
                lines.append(f"- Add credentials to config.yaml to enable")
            
            lines.append("")
        
        # Add setup instructions if no adapters are enabled
        enabled_adapters = self.config.get_enabled_adapters()
        if not enabled_adapters:
            lines.extend([
                "---",
                "**No adapters enabled.** To get started:",
                "",
                "1. Copy `config.example.yaml` to `config.yaml`",
                "2. Add your API credentials for at least one provider:",
                "   - **Whoop:** https://developer.whoop.com/",
                "   - **Strava:** https://www.strava.com/settings/api",
                "3. Restart the MCP server",
            ])
        
        return [TextContent(type="text", text="\n".join(lines))]
  • src/server.py:419-425 (registration)
    Tool call routing in _register_tools(): routes 'list_adapters' name to _handle_list_adapters handler via the MCP call_tool decorator.
    @self.server.call_tool()
    async def call_tool(name: str, arguments: dict) -> list[TextContent]:
        """Handle tool calls."""
        try:
            # General tools
            if name == "list_adapters":
                return await self._handle_list_adapters(arguments)
  • Tool definition in _get_general_tools(): defines 'list_adapters' with no input parameters (empty inputSchema) and a description about listing adapters and their authentication status.
    def _get_general_tools(self) -> list[Tool]:
        """Get general tools available regardless of adapters."""
        return [
            Tool(
                name="list_adapters",
                description="List all available health data adapters and their authentication status.",
                inputSchema={
                    "type": "object",
                    "properties": {},
                },
            ),
        ]
  • src/server.py:406-417 (registration)
    Tool listing registration: _get_general_tools() is called in list_tools() to register list_adapters as a general tool available regardless of which adapters are enabled.
    @self.server.list_tools()
    async def list_tools() -> list[Tool]:
        """List all available health tools based on enabled adapters."""
        tools = self._get_general_tools()
        
        if self.whoop:
            tools.extend(self._get_whoop_tools())
        
        if self.strava:
            tools.extend(self._get_strava_tools())
        
        return tools
  • Helper function get_adapter_status() in Config class returns a dict with enabled/configured status for 'whoop' and 'strava' adapters, used by the list_adapters handler.
    def get_adapter_status(self) -> dict[str, dict[str, Any]]:
        """Get status of all adapters.
        
        Returns:
            Dict mapping adapter names to their status info.
        """
        return {
            "whoop": {
                "enabled": self.whoop_enabled,
                "configured": bool(self.whoop_client_id and self.whoop_client_secret),
            },
            "strava": {
                "enabled": self.strava_enabled,
                "configured": bool(self.strava_client_id and self.strava_client_secret),
            },
        }
Behavior4/5

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

No annotations are provided, so the description must disclose behavioral traits. 'List' suggests a read-only operation, which is transparent, but the description does not explicitly state it is non-destructive or mention any rate limits or authentication requirements.

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?

The description is a single sentence that concisely conveys the tool's purpose and the information it provides. No extraneous words.

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 the tool's simplicity (no parameters, no siblings, no output schema), the description is mostly complete. It covers what the tool does and what data it returns, though it could benefit from mentioning the output format or any default behaviors.

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?

The input schema has zero parameters, so schema coverage is 100%. The description adds no parameter information beyond what is already known, which is acceptable for a parameterless tool.

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 'list' and the resource 'health data adapters' with the specific attribute 'authentication status'. There are no sibling tools, so differentiation is not required.

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 that the tool is used to retrieve a list of all adapters, but does not explicitly state when to avoid using it or alternatives. Since there are no sibling tools, the lack of exclusions is acceptable.

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/Marholoubek/health_mcp'

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