Skip to main content
Glama

get_system_info

Read-only

Retrieve comprehensive Arch Linux system information including kernel version, architecture, hostname, uptime, memory, disk usage, pacman version, and installed packages count for monitoring and diagnostics.

Instructions

[MONITORING] Get comprehensive system information including kernel version, architecture, hostname, uptime, and memory statistics. Works on any system. Returns: Arch version, kernel, architecture, pacman version, installed packages count, disk usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'get_system_info' tool. It gathers system info (kernel, architecture, hostname, uptime, memory from /proc/meminfo, and Arch Linux detection) by running system commands and parsing files. Returns a dict with these fields.
    async def get_system_info() -> Dict[str, Any]:
        """
        Get core system information.
    
        Returns:
            Dict with kernel, architecture, hostname, uptime, memory info
        """
        logger.info("Gathering system information")
    
        info = {}
    
        try:
            # Kernel version
            exit_code, stdout, _ = await run_command(["uname", "-r"], timeout=5, check=False)
            if exit_code == 0:
                info["kernel"] = stdout.strip()
    
            # Architecture
            exit_code, stdout, _ = await run_command(["uname", "-m"], timeout=5, check=False)
            if exit_code == 0:
                info["architecture"] = stdout.strip()
    
            # Hostname
            exit_code, stdout, _ = await run_command(["hostname"], timeout=5, check=False)
            if exit_code == 0:
                info["hostname"] = stdout.strip()
    
            # Uptime
            exit_code, stdout, _ = await run_command(["uptime", "-p"], timeout=5, check=False)
            if exit_code == 0:
                info["uptime"] = stdout.strip()
    
            # Memory info from /proc/meminfo
            try:
                meminfo_path = Path("/proc/meminfo")
                if meminfo_path.exists():
                    with open(meminfo_path, "r") as f:
                        meminfo = f.read()
    
                    # Parse memory values
                    mem_total_match = re.search(r"MemTotal:\s+(\d+)", meminfo)
                    mem_available_match = re.search(r"MemAvailable:\s+(\d+)", meminfo)
    
                    if mem_total_match:
                        info["memory_total_kb"] = int(mem_total_match.group(1))
                        info["memory_total_mb"] = int(mem_total_match.group(1)) // 1024
    
                    if mem_available_match:
                        info["memory_available_kb"] = int(mem_available_match.group(1))
                        info["memory_available_mb"] = int(mem_available_match.group(1)) // 1024
            except Exception as e:
                logger.warning(f"Failed to read memory info: {e}")
    
            info["is_arch_linux"] = IS_ARCH
    
            logger.info("Successfully gathered system information")
            return info
    
        except Exception as e:
            logger.error(f"Failed to gather system info: {e}")
            return create_error_response(
                "SystemInfoError",
                f"Failed to gather system information: {str(e)}"
            )
  • Tool input schema definition for 'get_system_info' in the MCP server's list_tools() method. Declares name, description, empty inputSchema (no arguments needed), and readOnlyHint annotation.
    # System Diagnostic Tools
    Tool(
        name="get_system_info",
        description="[MONITORING] Get comprehensive system information including kernel version, architecture, hostname, uptime, and memory statistics. Works on any system. Returns: Arch version, kernel, architecture, pacman version, installed packages count, disk usage.",
        inputSchema={
            "type": "object",
            "properties": {}
        },
        annotations=ToolAnnotations(readOnlyHint=True)
    ),
  • Tool call dispatch registration in server.py's call_tool() function. Routes the name 'get_system_info' to call the handler function get_system_info() (no arguments) and returns the result as JSON.
    # System Diagnostic Tools
    elif name == "get_system_info":
        result = await get_system_info()
        return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • Public API export: get_system_info is imported from .system module and listed in __all__ exports in the package's __init__.py.
    from .system import (
        get_system_info,
        check_disk_space,
        get_pacman_cache_stats,
        analyze_storage,
        check_failed_services,
        get_boot_logs,
        diagnose_system,
    )
    from .system_health_check import run_system_health_check
    from .news import get_latest_news, check_critical_news, get_news_since_last_update, fetch_news
    from .logs import (
        get_transaction_history,
        find_when_installed,
        find_failed_transactions,
        get_database_sync_history,
  • Metadata registration for 'get_system_info' in the TOOL_METADATA dictionary: category='monitoring', platform='any', permission='read', workflow='diagnose', related tools include 'analyze_storage' and 'check_failed_services'.
    "get_system_info": ToolMetadata(
        name="get_system_info",
        category="monitoring",
        platform="any",
        permission="read",
        workflow="diagnose",
        related_tools=["analyze_storage", "check_failed_services"],
        prerequisite_tools=[]
    ),
Behavior3/5

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

The description adds value beyond the readOnlyHint annotation by listing specific return fields (Arch version, kernel, etc.), but does not disclose any potential performance impact, permission requirements, or other behavioral traits. The annotation already covers safety, so the description provides moderate additional context.

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 very concise, using a clear structure with a [MONITORING] tag, a sentence about what it does, and a list of returns. Every sentence is informative and there is no fluff.

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?

Given no parameters and no output schema, the description adequately documents the return values and scope (system info). It is complete for the tool's simplicity and the annotations (readOnlyHint) are consistent.

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?

No parameters exist, and schema coverage is 100% (since there are none). The description does not need to add parameter information. Baseline 4 is appropriate for a parameterless tool.

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 it gets comprehensive system info and lists specific items (kernel, architecture, etc.). However, it does not explicitly differentiate itself from sibling tools like analyze_storage or run_system_health_check, so it loses a point for lack of distinctiveness.

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 only says 'Works on any system,' which implies a condition but provides no guidance on when to use this tool versus alternatives. There is no mention of when not to use it or what scenarios favor other sibling tools.

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/nihalxkumar/arch-linux-mcp'

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