Skip to main content
Glama

vllm_status

Monitor vLLM server health and operational status to verify system functionality and detect issues.

Instructions

Check the health and status of the vLLM server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler that formats and returns the vLLM server status as text
    async def get_server_status_text() -> str:
        """
        Get formatted server status as text.
    
        Returns:
            Formatted string with server status.
        """
        status = await get_server_status()
    
        # Status emoji
        status_emoji = {
            "healthy": "✅",
            "unhealthy": "⚠️",
            "offline": "❌",
            "unknown": "❓",
        }
    
        emoji = status_emoji.get(status["status"], "❓")
        
        lines = [
            f"## vLLM Server Status {emoji}",
            "",
            f"**Status:** {status['status']}",
            f"**Base URL:** {status['base_url']}",
        ]
    
        if status["models"]:
            lines.append(f"**Models:** {', '.join(status['models'])}")
        
        if status.get("error"):
            lines.append(f"**Error:** {status['error']}")
    
        if status.get("models_error"):
            lines.append(f"**Models Error:** {status['models_error']}")
    
        return "\n".join(lines)
  • Core logic that checks the vLLM server health and retrieves available models
    async def get_server_status() -> dict[str, Any]:
        """
        Get the current status of the vLLM server.
    
        Returns:
            Dictionary with server status information:
            - status: "healthy", "unhealthy", or "offline"
            - base_url: The configured vLLM base URL
            - models: List of available models (if healthy)
            - error: Error message (if any)
        """
        result: dict[str, Any] = {
            "status": "unknown",
            "base_url": "",
            "models": [],
            "error": None,
        }
    
        try:
            async with VLLMClient() as client:
                result["base_url"] = client.settings.base_url
    
                # Check health
                health = await client.health_check()
                if health.get("status") == "healthy":
                    result["status"] = "healthy"
    
                    # Get available models
                    try:
                        models = await client.list_models()
                        result["models"] = [m.get("id", "unknown") for m in models]
                    except VLLMClientError as e:
                        result["models_error"] = str(e)
                else:
                    result["status"] = "unhealthy"
                    result["error"] = f"Server returned status code: {health.get('code')}"
    
        except VLLMClientError as e:
            result["status"] = "offline"
            result["error"] = str(e)
    
        return result
  • Tool registration defining the vllm_status tool with its schema
    Tool(
        name="vllm_status",
        description="Check the health and status of the vLLM server",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Tool handler routing in call_tool function that calls get_server_status_text()
    elif name == "vllm_status":
        status_text = await get_server_status_text()
        return [TextContent(type="text", text=status_text)]
  • Helper method that performs the actual health check HTTP request to the vLLM server
    async def health_check(self) -> dict[str, Any]:
        """Check if the vLLM server is healthy."""
        session = await self._get_session()
        try:
            async with session.get(
                f"{self.settings.base_url}/health",
                headers=self.headers,
            ) as response:
                if response.status == 200:
                    return {"status": "healthy", "code": 200}
                return {"status": "unhealthy", "code": response.status}
        except aiohttp.ClientConnectorError as e:
            raise VLLMConnectionError(f"Cannot connect to vLLM server: {e}") from e
        except asyncio.TimeoutError as e:
            raise VLLMConnectionError("Connection to vLLM server timed out") from e
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Check' implies a read-only operation, it doesn't specify what constitutes 'health and status' (e.g., uptime, resource usage, error rates), whether authentication is required, or what the response format might be. This leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's perfectly front-loaded and appropriately sized for a simple status-checking tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a status-checking tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what health indicators are checked, what the return values might include, or how to interpret results, leaving the agent with inadequate context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the lack of inputs. The description appropriately doesn't add parameter information, maintaining a baseline score of 4 for parameterless tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Check the health and status of the vLLM server', which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get_platform_status' or 'get_vllm_logs' that might also provide status-related information, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_platform_status' or 'get_vllm_logs'. It doesn't mention prerequisites, appropriate contexts, or exclusions, leaving the agent with minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/micytao/vllm-mcp-server'

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