Skip to main content
Glama
batteryshark

System Information MCP Server

by batteryshark

get_hardware_details

Retrieve detailed hardware specifications including CPU, RAM, GPU, and storage information for system diagnostics and capability assessment.

Instructions

Get comprehensive hardware information - CPU, RAM, GPU, storage overview.

Detailed hardware specs including performance metrics and device detection. Use for hardware diagnostics and system capability assessment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function decorated with @mcp.tool, which registers and implements the get_hardware_details tool. It calls the get_hardware_info helper and returns formatted ToolResult.
    @mcp.tool
    def get_hardware_details() -> ToolResult:
        """Get comprehensive hardware information - CPU, RAM, GPU, storage overview.
        
        Detailed hardware specs including performance metrics and device detection.
        Use for hardware diagnostics and system capability assessment.
        """
        info_sections = []
        info_sections.append("# Hardware Details")
        info_sections.append(f"*Generated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}*\n")
        
        try:
            info_sections.extend(get_hardware_info())
        except Exception as e:
            info_sections.append(f"⚠️ **Hardware detection error**: {str(e)}")
        
        return text_response("\n".join(info_sections))
  • Core helper function that collects detailed hardware information including CPU stats, RAM usage, GPU details (platform-specific), battery info, and system uptime using psutil and platform tools.
    def get_hardware_info() -> List[str]:
        """Get hardware information (CPU, RAM, GPU)"""
        info = []
        info.append("\n## 🔧 Hardware")
        
        # CPU Information
        cpu_count = psutil.cpu_count(logical=False)
        cpu_logical = psutil.cpu_count(logical=True)
        cpu_freq = psutil.cpu_freq()
        cpu_percent = psutil.cpu_percent(interval=1)
        
        info.append(f"- **CPU Cores**: {cpu_count} physical, {cpu_logical} logical")
        if cpu_freq:
            info.append(f"- **CPU Frequency**: {cpu_freq.current:.0f} MHz (max: {cpu_freq.max:.0f} MHz)")
        info.append(f"- **CPU Usage**: {cpu_percent}%")
        
        # Memory Information
        memory = psutil.virtual_memory()
        swap = psutil.swap_memory()
        
        info.append(f"- **Total RAM**: {memory.total / (1024**3):.1f} GB")
        info.append(f"- **Available RAM**: {memory.available / (1024**3):.1f} GB ({memory.percent}% used)")
        if swap.total > 0:
            info.append(f"- **Swap**: {swap.total / (1024**3):.1f} GB ({swap.percent}% used)")
        
        # GPU Information
        gpu_info = _get_gpu_info()
        if gpu_info:
            info.extend(gpu_info)
        
        # Battery Information (if available)
        battery_info = _get_battery_info()
        if battery_info:
            info.extend(battery_info)
        
        # Boot time and uptime
        boot_time = datetime.fromtimestamp(psutil.boot_time())
        uptime = datetime.now() - boot_time
        info.append(f"\n- **Boot Time**: {boot_time.strftime('%Y-%m-%d %H:%M:%S')}")
        info.append(f"- **Uptime**: {uptime.days} days, {uptime.seconds//3600} hours")
        
        return info
Behavior2/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 of behavioral disclosure. It mentions 'detailed hardware specs' and 'performance metrics,' implying a read-only operation, but doesn't explicitly state if it's safe, requires permissions, has rate limits, or what the output format looks like. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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?

The description is appropriately sized and front-loaded, starting with a clear purpose statement followed by usage guidelines in two concise sentences. Every sentence adds value: the first defines what the tool does, and the second explains when to use it. There's no redundant information, making it efficient and well-structured.

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 complexity (no parameters, no output schema, no annotations), the description is adequate but has clear gaps. It covers purpose and usage well, but without annotations or output schema, it lacks details on behavioral traits like safety, permissions, or return format. For a diagnostic tool, more context on what 'comprehensive' entails or example outputs would enhance completeness, but it's minimally viable as-is.

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 (since there are no parameters to describe). The description doesn't need to add parameter semantics, so it naturally compensates by focusing on the tool's purpose and usage. This meets the baseline for tools with no parameters, as there's nothing to document beyond what's already covered.

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 retrieving comprehensive hardware information including CPU, RAM, GPU, and storage, with specific mention of performance metrics and device detection. It distinguishes itself from siblings like get_connected_devices or get_display_info by covering broader hardware aspects, though it doesn't explicitly contrast with get_full_system_report or get_system_summary, which might overlap.

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 explicit usage contexts: 'Use for hardware diagnostics and system capability assessment.' This gives clear guidance on when to use the tool, such as for troubleshooting or evaluating system performance. However, it doesn't specify when not to use it or name alternatives among siblings, like using get_system_summary for a high-level overview instead.

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/batteryshark/mcp-sysinfo'

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