getHardwareInfo
Retrieve detailed hardware information from the current operating environment, such as production date, to analyze and troubleshoot system setup.
Instructions
获取当前设备的硬件信息,包括生产日期等
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:469-477 (handler)Handler for the getHardwareInfo tool. It uses the systeminformation library (si.system()) to fetch comprehensive hardware information and returns it as a formatted JSON string in the tool response.case "getHardwareInfo": { const hardwareInfo = await si.system(); return { content: [{ type: "text", text: JSON.stringify(hardwareInfo, null, 2) }] }; }
- src/index.ts:127-135 (registration)Registration of the getHardwareInfo tool in the listTools response, including name, description, and empty input schema (no parameters required).{ name: "getHardwareInfo", description: "获取当前设备的硬件信息,包括生产日期等", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:130-134 (schema)Input schema for getHardwareInfo tool, which is an empty object (no input parameters).inputSchema: { type: "object", properties: {}, required: [] }