Skip to main content
Glama

get_server_status

Check Radarr and Sonarr server status and connectivity to monitor media management system availability.

Instructions

Check the status and connectivity of Radarr and Sonarr servers.

Returns: Status information for both servers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the get_server_status tool. Instantiates MediaServerAPI and retrieves status from Radarr and Sonarr servers.
    async def get_server_status() -> Dict[str, Any]:
        """
        Check the status and connectivity of Radarr and Sonarr servers.
        
        Returns:
            Status information for both servers
        """
        if not config:
            return {"error": "Server not configured"}
        
        api = MediaServerAPI(config)
        
        radarr_status = await api.check_radarr_status()
        sonarr_status = await api.check_sonarr_status()
        
        return {
            "radarr": radarr_status,
            "sonarr": sonarr_status,
            "timestamp": datetime.now().isoformat()
        }
  • FastMCP decorator that registers the get_server_status function as a tool.
    @mcp.tool
  • Helper method in MediaServerAPI class that checks Radarr server status via its API.
    async def check_radarr_status(self) -> Dict[str, Any]:
        """Check Radarr server status"""
        url = f"{self.config.radarr_url}/api/v3/system/status"
        headers = {"X-Api-Key": self.config.radarr_api_key}
        
        try:
            response = await self.client.get(url, headers=headers)
            response.raise_for_status()
            return {"status": "connected", "data": response.json()}
        except Exception as e:
            return {"status": "error", "message": str(e)}
  • Helper method in MediaServerAPI class that checks Sonarr server status via its API.
    async def check_sonarr_status(self) -> Dict[str, Any]:
        """Check Sonarr server status"""
        url = f"{self.config.sonarr_url}/api/v3/system/status"
        headers = {"X-Api-Key": self.config.sonarr_api_key}
        
        try:
            response = await self.client.get(url, headers=headers)
            response.raise_for_status()
            return {"status": "connected", "data": response.json()}
        except Exception as e:
            return {"status": "error", "message": str(e)}

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/omniwaifu/arr-assistant-mcp'

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