Skip to main content
Glama

get_platform_status

Check Docker/Podman and GPU availability to verify platform readiness for vLLM operations across Linux, macOS, and Windows systems.

Instructions

Get platform information including Docker and GPU availability

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for get_platform_status tool. Retrieves platform information using get_platform_info() and formats it into a TextContent response with platform type, container runtime status, GPU availability, cache path, and notes.
    async def get_platform_status(arguments: dict[str, Any]) -> list[TextContent]:
        """
        Get detailed platform and container runtime status information.
    
        Returns:
            List of TextContent with platform information.
        """
        platform_info = await get_platform_info()
        
        # Platform emoji
        platform_emoji = {
            Platform.LINUX: "🐧",
            Platform.MACOS_ARM: "🍎",
            Platform.MACOS_INTEL: "🍎",
            Platform.WINDOWS: "🪟",
            Platform.UNKNOWN: "❓",
        }
        
        emoji = platform_emoji.get(platform_info.platform, "❓")
        
        # Runtime status
        if platform_info.container_runtime == ContainerRuntime.NONE:
            runtime_status = "❌ Not installed"
            runtime_name = "None"
        elif platform_info.runtime_running:
            runtime_status = "✅ Running"
            runtime_name = platform_info.container_runtime.value.capitalize()
        else:
            runtime_status = "⚠️ Installed but not running"
            runtime_name = platform_info.container_runtime.value.capitalize()
        
        gpu_status = "✅ Available" if platform_info.has_nvidia_gpu else "❌ Not available"
        
        notes_text = "\n".join(f"  - {note}" for note in platform_info.notes) if platform_info.notes else "  - None"
        
        return [TextContent(
            type="text",
            text=f"## Platform Status {emoji}\n\n"
                 f"**Platform:** {platform_info.platform.value}\n"
                 f"**Container Runtime:** {runtime_name} ({runtime_status})\n"
                 f"**NVIDIA GPU:** {gpu_status}\n"
                 f"**HF Cache Path:** `{platform_info.cache_path}`\n"
                 f"**GPU Flags:** `{' '.join(platform_info.gpu_flags) or 'None (CPU mode)'}`\n"
                 f"\n**Notes:**\n{notes_text}"
        )]
  • MCP tool registration for get_platform_status. Defines the tool name, description, and input schema (empty object type since no parameters are required).
    Tool(
        name="get_platform_status",
        description="Get platform information including Docker and GPU availability",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Type definitions used by get_platform_status: Platform enum (LINUX, MACOS_ARM, MACOS_INTEL, WINDOWS, UNKNOWN), ContainerRuntime enum (PODMAN, DOCKER, NONE), and PlatformInfo dataclass containing platform detection results.
    class Platform(Enum):
        """Supported platforms."""
        LINUX = "linux"
        MACOS_ARM = "macos_arm"
        MACOS_INTEL = "macos_intel"
        WINDOWS = "windows"
        UNKNOWN = "unknown"
    
    
    class ContainerRuntime(Enum):
        """Supported container runtimes."""
        PODMAN = "podman"
        DOCKER = "docker"
        NONE = "none"
    
    
    @dataclass
    class PlatformInfo:
        """Platform-specific information."""
        platform: Platform
        container_runtime: ContainerRuntime
        has_nvidia_gpu: bool
        runtime_available: bool
        runtime_running: bool
        cache_path: str
        gpu_flags: list[str]
        notes: list[str]
  • Helper function get_platform_info() called by get_platform_status handler. Detects the current platform, container runtime availability, NVIDIA GPU presence, and compiles platform-specific configuration including GPU flags and notes.
    async def get_platform_info() -> PlatformInfo:
        """Get comprehensive platform information."""
        plat = _detect_platform()
        runtime, runtime_available, runtime_running, _ = await _detect_container_runtime()
        has_nvidia = await _check_nvidia_gpu(runtime) if runtime_running else False
        
        notes: list[str] = []
        gpu_flags: list[str] = []
        
        # Runtime info
        if runtime == ContainerRuntime.PODMAN:
            notes.append("Using Podman as container runtime")
        elif runtime == ContainerRuntime.DOCKER:
            notes.append("Using Docker as container runtime")
        else:
            notes.append("No container runtime available")
        
        if plat == Platform.LINUX:
            if has_nvidia:
                if runtime == ContainerRuntime.PODMAN:
                    # Podman uses --device for GPU access with CDI
                    gpu_flags = ["--device", "nvidia.com/gpu=all"]
                else:
                    gpu_flags = ["--gpus", "all"]
                notes.append("NVIDIA GPU detected - full GPU acceleration available")
            else:
                notes.append("No NVIDIA GPU detected - running in CPU mode")
                
        elif plat == Platform.MACOS_ARM:
            notes.append("Apple Silicon detected - containers run in CPU mode")
            notes.append("For GPU acceleration, consider running vLLM natively with Metal")
            
        elif plat == Platform.MACOS_INTEL:
            notes.append("Intel Mac detected - containers run in CPU mode")
            
        elif plat == Platform.WINDOWS:
            if has_nvidia:
                gpu_flags = ["--gpus", "all"]
                notes.append("NVIDIA GPU detected via WSL2 - GPU acceleration available")
            else:
                notes.append("No NVIDIA GPU detected - running in CPU mode")
                notes.append("Ensure WSL2 and NVIDIA Container Toolkit are installed for GPU support")
        
        return PlatformInfo(
            platform=plat,
            container_runtime=runtime,
            has_nvidia_gpu=has_nvidia,
            runtime_available=runtime_available,
            runtime_running=runtime_running,
            cache_path=_get_cache_path(plat),
            gpu_flags=gpu_flags,
            notes=notes,
        )
  • Routing logic in handle_tool_request that dispatches to the get_platform_status handler when the tool name matches.
    elif name == "get_platform_status":
        return await get_platform_status(arguments)
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. It states the tool retrieves information but doesn't specify whether this is a read-only operation, what permissions are needed, if there are rate limits, or what format the output takes. The description is too minimal for a tool with zero annotation coverage.

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 redundant information. It's appropriately sized and front-loaded, with every word contributing value.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It covers what the tool does but lacks details on output format, error conditions, or behavioral traits. For a status-checking tool, this is the bare minimum to be functional.

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 fully documents the absence of inputs. The description appropriately doesn't mention parameters, which aligns with the schema. A baseline of 4 is applied since no parameters exist and the description doesn't contradict this.

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 with a specific verb ('Get') and resource ('platform information'), and specifies the scope ('including Docker and GPU availability'). It doesn't explicitly distinguish from sibling tools like 'vllm_status' or 'get_model_info', which prevents 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 'vllm_status' or 'list_vllm_containers'. It lacks any context about prerequisites, timing, or exclusions, leaving the agent to infer usage from the name alone.

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