ping
Check server availability and get basic information like version and server time to verify connectivity 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 handles both registration and execution. It returns basic server health information without any input parameters.@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() }