getCpuInfo
Retrieve detailed CPU information of the current system to analyze and monitor hardware performance within the operating environment.
Instructions
获取当前系统的 CPU 信息
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:317-328 (handler)The handler implementation for the 'getCpuInfo' tool. It retrieves CPU information using Node.js 'os.cpus()' and returns it as a JSON-stringified text content block.case "getCpuInfo": { const cpuInfo = { cpus: os.cpus() }; return { content: [{ type: "text", text: JSON.stringify(cpuInfo, null, 2) }] }; }
- src/index.ts:46-53 (registration)Registration of the 'getCpuInfo' tool in the tools list returned by the ListToolsRequest handler. Includes name, description, and input schema definition (empty object).{ name: "getCpuInfo", description: "获取当前系统的 CPU 信息", inputSchema: { type: "object", properties: {}, required: [] }
- src/index.ts:46-53 (schema)Input schema definition for 'getCpuInfo' tool: an empty object with no properties or requirements.{ name: "getCpuInfo", description: "获取当前系统的 CPU 信息", inputSchema: { type: "object", properties: {}, required: [] }