Skip to main content
Glama

get_system_stats

Retrieve ComfyUI server health metrics including version details, memory usage, and device information to monitor system status and resource utilization.

Instructions

Get ComfyUI server health: version, memory, device info.

    Returns system information including:
    - ComfyUI and PyTorch versions
    - RAM usage
    - Device info (CPU/GPU)

    Use this to verify ComfyUI is running and check resource usage.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for get_system_stats. Fetches and validates ComfyUI system statistics, decorated with @mcp.tool() for automatic registration.
    @mcp.tool()
    def get_system_stats(ctx: Context) -> dict:
        """Get ComfyUI server health: version, memory, device info.
    
        Returns system information including:
        - ComfyUI and PyTorch versions
        - RAM usage
        - Device info (CPU/GPU)
    
        Use this to verify ComfyUI is running and check resource usage.
        """
        ctx.info("Fetching system stats...")
        try:
            data = comfy_get("/system_stats")
            stats = SystemStats(**data)
            return stats.model_dump()
        except Exception as e:
            return ErrorResponse.unavailable(str(e)).model_dump()
  • Pydantic model used to validate and structure the response from ComfyUI's /system_stats endpoint.
    class SystemStats(BaseModel):
        """Complete system statistics from /system_stats."""
    
        system: SystemInfo
        devices: list[DeviceInfo]
  • Registers the system tools (including get_system_stats) by calling register_system_tools(mcp).
    def register_all_tools(mcp):
        """Register all tools with the MCP server."""
        register_system_tools(mcp)
        register_discovery_tools(mcp)
        register_workflow_tools(mcp)
        register_execution_tools(mcp)
  • Top-level registration of all MCP tools during server setup, which includes the system tools.
    # Register all tools
    register_all_tools(mcp)
  • API helper function providing a convenient wrapper for fetching system stats via ComfyUI's /system_stats endpoint.
    def get_system_stats() -> dict:
        """Get ComfyUI system statistics."""
        return comfy_get("/system_stats")
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes what the tool returns (system information) and its purpose (health verification), but lacks details on behavioral traits such as rate limits, authentication requirements, or whether it's a read-only operation (though implied by 'get'). This is adequate but has gaps for a tool with no annotations.

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 well-structured and front-loaded with the main purpose, followed by bullet points for returns and a usage guideline. Every sentence adds value without redundancy, and it is appropriately sized for the tool's simplicity.

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

Completeness4/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is mostly complete: it explains what the tool does, what it returns, and when to use it. However, it lacks details on output format or error handling, which could be useful for an agent, preventing a perfect score.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description does not mention any parameters, which is appropriate. A baseline of 4 is applied since it correctly omits unnecessary parameter details, but it doesn't add extra value beyond the schema.

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

Purpose5/5

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

The description clearly states the specific action ('Get ComfyUI server health') and resource ('system information'), distinguishing it from sibling tools that focus on workflows, nodes, images, or queues. It explicitly lists what information is returned (versions, memory, device info), making the purpose unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('to verify ComfyUI is running and check resource usage'), which is helpful for an agent. However, it does not explicitly state when not to use it or name alternatives (e.g., using get_queue_status for queue-related health checks), which prevents a perfect score.

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/IO-AtelierTech/comfyui-mcp'

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