Skip to main content
Glama

ShallowCodeResearch_get_health_status

Retrieve system health status and operational metrics to monitor availability, resources, and advanced features for comprehensive system oversight.

Instructions

Get comprehensive system health status including advanced monitoring features. Retrieves detailed health information about the system including availability of advanced features, system resources, and operational metrics. Returns basic information if advanced monitoring is not available. Returns: A dictionary containing system health status and metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • app.py:274-300 (handler)
    Handler function implementing the get_health_status tool logic, which provides comprehensive system health status. This is likely the core implementation for 'ShallowCodeResearch_get_health_status' given the app context.
    def get_health_status() -> Dict[str, Any]: """ Get comprehensive system health status including advanced monitoring features. Retrieves detailed health information about the system including availability of advanced features, system resources, and operational metrics. Returns basic information if advanced monitoring is not available. Returns: Dict[str, Any]: A dictionary containing system health status and metrics """ if not ADVANCED_FEATURES_AVAILABLE: return { "status": "basic_mode", "message": "Advanced features not available. Install 'pip install psutil aiohttp' to enable health monitoring.", "system_info": { "python_version": f"{types.__module__}", "gradio_available": True, "modal_available": True } } try: return health_monitor.get_health_stats() except Exception as e: return {"error": f"Health monitoring failed: {str(e)}"}
  • app.py:1064-1069 (registration)
    Gradio interface registration of the health status tool as an MCP endpoint with api_name="get_health_status_service". The prefix 'ShallowCodeResearch_' may be applied at the MCP server level based on the app/space name.
    health_btn.click( fn=get_health_status, inputs=[], outputs=health_output, api_name="get_health_status_service" )
  • Supporting health stats computation used by the main handler via health_monitor.get_health_stats().
    def get_health_stats(self, service: str = None) -> Dict[str, Any]: """Get health statistics for a service or all services.""" with self.lock: if service: calls = [call for call in self.call_history if call["service"] == service] else: calls = list(self.call_history) if not calls: return {"error": "No call history available"} total_calls = len(calls) successful_calls = sum(1 for call in calls if call["success"]) success_rate = successful_calls / total_calls response_times = [call["response_time"] for call in calls] avg_response_time = sum(response_times) / len(response_times) return { "service": service or "all", "total_calls": total_calls, "success_rate": success_rate, "avg_response_time_ms": avg_response_time * 1000, "recent_failures": total_calls - successful_calls }

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/CodeHalwell/gradio-mcp-agent-hack'

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