Skip to main content
Glama

check

Check which quantization backends (GGUF, GPTQ, AWQ) are installed, verify PyTorch and transformers availability, and view GPU and RAM details. No arguments required.

Instructions

Check available quantization backends on this system.

Reports which quantization engines (GGUF/GPTQ/AWQ) are installed, whether PyTorch and transformers are available, GPU information (CUDA or Apple MPS), and system RAM.

No arguments required. Lightweight system check.

Returns: Dictionary of available backends and hardware info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'check' tool handler function registered with @mcp.tool(). It calls check_dependencies() and returns available backends (GGUF/GPTQ/AWQ), core dependencies (torch, transformers), and hardware info (platform, GPU, RAM).
    @mcp.tool()
    def check() -> dict[str, Any]:
        """Check available quantization backends on this system.
    
        Reports which quantization engines (GGUF/GPTQ/AWQ) are installed,
        whether PyTorch and transformers are available, GPU information
        (CUDA or Apple MPS), and system RAM.
    
        No arguments required. Lightweight system check.
    
        Returns:
            Dictionary of available backends and hardware info.
        """
        deps = check_dependencies()
    
        backends = {
            "gguf": {
                "available": deps.get("gguf", False),
                "install": "pip install llama-cpp-python",
            },
            "gptq": {
                "available": deps.get("gptq", False),
                "install": "pip install auto-gptq datasets",
            },
            "awq": {
                "available": deps.get("awq", False),
                "install": "pip install autoawq",
            },
        }
    
        hardware = {
            "platform": deps.get("platform", "unknown"),
            "arch": deps.get("arch", "unknown"),
            "system_ram_gb": deps.get("system_ram_gb", 0),
        }
    
        if deps.get("cuda"):
            hardware["gpu"] = deps.get("gpu_name", "CUDA GPU")
            hardware["gpu_mem_gb"] = deps.get("gpu_mem_gb", 0)
            hardware["accelerator"] = "cuda"
        elif deps.get("mps"):
            hardware["accelerator"] = "mps"
            hardware["gpu"] = "Apple Silicon (Metal Performance Shaders)"
        else:
            hardware["accelerator"] = "cpu"
    
        core = {
            "torch": {
                "available": deps.get("torch", False),
                "version": deps.get("torch_version", None),
                "install": "pip install torch",
            },
            "transformers": {
                "available": deps.get("transformers", False),
                "version": deps.get("transformers_version", None),
                "install": "pip install transformers",
            },
        }
    
        return {
            "backends": backends,
            "core_dependencies": core,
            "hardware": hardware,
            "server_version": __version__,
        }
  • The tool is registered as an MCP tool via the @mcp.tool() decorator on line 89, with the function name 'check'.
    @mcp.tool()
    def check() -> dict[str, Any]:
  • The check_dependencies() helper function that the 'check' tool relies on. It probes for llama.cpp (GGUF), AutoGPTQ, AutoAWQ, transformers, and torch availability, plus CUDA/MPS GPU detection and system RAM.
    def check_dependencies() -> dict[str, Any]:
        """Check which quantization backends are available."""
        import shutil
    
        available: dict[str, Any] = {}
    
        # Check for llama.cpp (GGUF)
        llama_convert = shutil.which("llama-quantize") or shutil.which("quantize")
        if llama_convert:
            available["gguf"] = True
        else:
            try:
                import llama_cpp  # noqa: F401
    
                available["gguf"] = True
            except ImportError:
                available["gguf"] = False
    
        # Check for AutoGPTQ
        try:
            import auto_gptq  # noqa: F401
    
            available["gptq"] = True
        except ImportError:
            available["gptq"] = False
    
        # Check for AutoAWQ
        try:
            import awq  # noqa: F401
    
            available["awq"] = True
        except ImportError:
            available["awq"] = False
    
        # Check for transformers
        try:
            import transformers  # noqa: F401
    
            available["transformers"] = True
            available["transformers_version"] = transformers.__version__
        except ImportError:
            available["transformers"] = False
    
        # Check for torch
        try:
            import torch
    
            available["torch"] = True
            available["torch_version"] = torch.__version__
            available["cuda"] = torch.cuda.is_available()
            if available["cuda"]:
                available["gpu_name"] = torch.cuda.get_device_name(0)
                available["gpu_mem_gb"] = round(
                    torch.cuda.get_device_properties(0).total_mem / 1e9, 1
                )
            available["mps"] = (
                hasattr(torch.backends, "mps") and torch.backends.mps.is_available()
            )
        except ImportError:
            available["torch"] = False
            available["cuda"] = False
            available["mps"] = False
    
        available["system_ram_gb"] = get_system_ram_gb()
        available["platform"] = platform.system()
        available["arch"] = platform.machine()
    
        return available
Behavior4/5

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

No annotations provided, but description fully covers behavioral impact: a read-only system check with no side effects. Could explicitly state non-destructive, but currently sufficient.

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

Conciseness4/5

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

Description is concise, front-loads purpose, and uses clear sections. Minor redundancy in 'No arguments required' and 'lightweight system check', but overall efficient.

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

Completeness5/5

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

With no parameters and an output schema noted, description fully specifies what the tool does and returns. No gaps given simplicity.

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?

Zero parameters with 100% schema coverage; description reinforces 'no arguments required' and explains return value, adding value beyond 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?

Description clearly states the tool checks available quantization backends, listing specific engines and hardware info. It distinguishes from sibling tools like quantize or evaluate by focusing on system readiness.

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?

Indicates no arguments required and is lightweight, implying use as a preliminary check. Does not explicitly contrast with siblings, but context is adequate.

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/ShipItAndPray/mcp-turboquant'

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