Windows-memory-info
Retrieve real-time Windows memory usage data including total, used, and available memory. Monitor system performance.
Instructions
Get memory information of the Windows system.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:136-139 (registration)Registration of the 'Windows-memory-info' MCP tool via @mcp.tool decorator with name and description.
@mcp.tool( name="Windows-memory-info", description="Get memory information of the Windows system." ) - main.py:140-152 (handler)The handler function 'get_memory_info' that uses psutil.virtual_memory() to retrieve and return total, available, and used memory in GB.
def get_memory_info() -> dict[str, str]: """Get memory information of the Windows system.""" import psutil memory = psutil.virtual_memory() total_memory = memory.total / (1024 ** 3) available_memory = memory.available / (1024 ** 3) used_memory = memory.used / (1024 ** 3) return { "total_memory": f"{total_memory:.2f} GB", "available_memory": f"{available_memory:.2f} GB", "used_memory": f"{used_memory:.2f} GB" }