Windows-system-info
Retrieve Windows system details including OS version, release, architecture, and hostname for real-time monitoring and diagnostics.
Instructions
Get Windows system information including OS version, release, architecture, and hostname
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-system-info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:26-48 (handler)The tool registration (via @mcp.tool decorator) and handler function 'get_windows_name_version' that implements the 'Windows-system-info' tool logic. It uses platform and socket modules to retrieve OS version, release, architecture, and hostname, returning a dict of string key-value pairs.
@mcp.tool( name="Windows-system-info", description="Get Windows system information including OS version, release, architecture, and hostname", ) def get_windows_name_version() -> dict[str, str]: """Get Windows system information including OS version, release, architecture, and hostname.""" import platform import socket name = platform.node() version = platform.version() release = platform.release() system = platform.system() architecture = platform.architecture()[0] hostname = socket.gethostname() return { "name": name, "system": system, "release": release, "version": version, "architecture": architecture, "hostname": hostname } - main.py:26-30 (registration)The @mcp.tool decorator registers the tool with name 'Windows-system-info' and provides its description.
@mcp.tool( name="Windows-system-info", description="Get Windows system information including OS version, release, architecture, and hostname", ) def get_windows_name_version() -> dict[str, str]: - main.py:13-16 (schema)The DriveInfo schema defined in the same file is not directly used by this tool (which returns a plain dict), but is included for context of the file's schema definitions.
class DriveInfo(BaseModel): """Model for drive information.""" name: str = Field(description="Drive name") used_spaceGB: float = Field(description="Used space in GB")