Skip to main content
Glama

NetBox Read/Write MCP Server

health.py2.04 kB
#!/usr/bin/env python3 """ System Health Management Tools System health, monitoring and status tools following Gemini's dependency injection architecture. These tools provide insight into NetBox system status and MCP server health. """ from typing import Dict, Any import logging from ...registry import mcp_tool from ...client import NetBoxClient logger = logging.getLogger(__name__) @mcp_tool(category="system") def netbox_health_check(client: NetBoxClient) -> Dict[str, Any]: """ Get NetBox system health status and connection information. Args: client: NetBoxClient instance (injected by dependency system) Returns: Health status information containing: - connected: True if connected, False otherwise - version: NetBox version (e.g., "4.2.9") - python_version: Python version of NetBox instance - django_version: Django version of NetBox instance - response_time_ms: Response time in milliseconds - plugins: Installed NetBox plugins - error: Error message if connection failed """ try: logger.info(f"Health check using client instance ID: {id(client)}") status = client.health_check() return { "connected": status.connected, "version": status.version, "python_version": status.python_version, "django_version": status.django_version, "response_time_ms": status.response_time_ms, "plugins": status.plugins, "cache_stats": status.cache_stats } except Exception as e: logger.error(f"Health check failed: {e}") return { "connected": False, "error": str(e), "error_type": type(e).__name__ } # TODO: Implement advanced system management tools # - netbox_monitor_performance # - netbox_diagnose_system_issues # - netbox_manage_alerts_notifications # - netbox_optimize_system_performance # - netbox_automate_maintenance # - netbox_monitor_integration_health

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/Deployment-Team/netbox-mcp'

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