Windows-cpu-info
Retrieves Windows CPU information including utilization, model, and core count to monitor system performance.
Instructions
Get CPU information of the Windows system.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "Windows-cpu-info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- main.py:171-173 (registration)Registration of the 'Windows-cpu-info' tool via the @mcp.tool decorator with its name and description.
@mcp.tool( name="Windows-cpu-info", description="Get CPU information of the Windows system." - main.py:175-187 (handler)Handler function 'get_cpu_info' that executes the tool logic: retrieves CPU model, core count, and frequency using psutil and platform modules.
def get_cpu_info() -> str: """Get CPU information of the Windows system.""" import psutil import platform cpu_count = psutil.cpu_count(logical=True) cpu_freq = psutil.cpu_freq() cpu_model = platform.processor() if cpu_freq is not None: current, min_f, max_f = cpu_freq.current, cpu_freq.min, cpu_freq.max else: current, min_f, max_f = 0.0, 0.0, 0.0 return f"Model: {cpu_model}, CPU Count: {cpu_count}, Frequency: {current} MHz, Min: {min_f} MHz, Max: {max_f} MHz"