getCpuInfo
Retrieve CPU information from the current operating environment to analyze system specifications and monitor performance metrics.
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 uses Node.js 'os.cpus()' to fetch CPU information and returns it as a JSON string in the tool response format.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 list of available tools. Defines the tool name, Chinese description, and an empty input schema (no parameters required).{ name: "getCpuInfo", description: "获取当前系统的 CPU 信息", inputSchema: { type: "object", properties: {}, required: [] }
- src/index.ts:49-52 (schema)Input schema for the 'getCpuInfo' tool, specifying an empty object (no input parameters). Note: output schema is not explicitly defined.inputSchema: { type: "object", properties: {}, required: []