get_system_info
Retrieve WSL system information from Windows Subsystem for Linux environments to monitor configuration and performance.
Instructions
Get WSL system information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:108-141 (registration)Registration of the 'get_system_info' tool using this.server.tool, including the inline handler function.this.server.tool( { name: 'get_system_info', description: 'Get WSL system information', annotations: { readOnlyHint: true, }, }, async () => { try { const result = await this.command_executor.execute_command( 'uname -a && lsb_release -a 2>/dev/null || cat /etc/os-release', ); return { content: [ { type: 'text' as const, text: this.format_output(result), }, ], }; } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, );
- src/index.ts:116-140 (handler)The handler function for get_system_info, which executes WSL system info commands (uname, lsb_release or os-release), formats the output using format_output, and returns as text content or error.async () => { try { const result = await this.command_executor.execute_command( 'uname -a && lsb_release -a 2>/dev/null || cat /etc/os-release', ); return { content: [ { type: 'text' as const, text: this.format_output(result), }, ], }; } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } },