ping
Check server availability and retrieve basic information like version and server time using a simple endpoint. Monitor connectivity and verify server responsiveness without complex API calls.
Instructions
Simple ping endpoint to check server availability and get basic server information.
This endpoint provides a lightweight way to:
- Verify the server is running and responsive
- Get basic server information including version and server time
- Check connectivity without making complex API calls
Returns:
Dict[str, Any]: Dictionary containing status and basic server information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- splunk_mcp.py:869-898 (handler)The main handler function for the 'ping' tool. Decorated with @mcp.tool() which registers it as an MCP tool named 'ping'. Returns server status, version, timestamp, and capabilities on success, or error info on failure. No input parameters required.@mcp.tool() async def ping() -> Dict[str, Any]: """ Simple ping endpoint to check server availability and get basic server information. This endpoint provides a lightweight way to: - Verify the server is running and responsive - Get basic server information including version and server time - Check connectivity without making complex API calls Returns: Dict[str, Any]: Dictionary containing status and basic server information """ try: return { "status": "ok", "server": "splunk-mcp", "version": VERSION, "timestamp": datetime.now().isoformat(), "protocol": "mcp", "capabilities": ["splunk"] } except Exception as e: logger.error(f"❌ Error in ping endpoint: {str(e)}") return { "status": "error", "error": str(e), "timestamp": datetime.now().isoformat() }