getCpuInfo
Retrieve CPU information from the current operating environment to analyze system specifications and monitor performance metrics.
Instructions
获取当前系统的 CPU 信息
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": "getCpuInfo"
}
}Input 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: []