getPlatformInfo
Retrieve detailed platform information about the current operating environment to analyze system configurations and ensure compatibility.
Instructions
获取当前系统的平台信息
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"required": [],
"type": "object"
}
Implementation Reference
- src/index.ts:286-302 (handler)The execution logic for the 'getPlatformInfo' tool, retrieving OS platform, architecture, hostname, type, release, and version using Node's os module and returning as JSON.case "getPlatformInfo": { const platformInfo = { platform: os.platform(), arch: os.arch(), hostname: os.hostname(), type: os.type(), release: os.release(), version: os.version() }; return { content: [{ type: "text", text: JSON.stringify(platformInfo, null, 2) }] }; }
- src/index.ts:28-36 (schema)Tool schema definition in the listTools response, including name, description, and empty input schema (no parameters required).{ name: "getPlatformInfo", description: "获取当前系统的平台信息", inputSchema: { type: "object", properties: {}, required: [] } },
- src/index.ts:28-36 (registration)Registration of the 'getPlatformInfo' tool in the tools list returned by the ListTools handler.{ name: "getPlatformInfo", description: "获取当前系统的平台信息", inputSchema: { type: "object", properties: {}, required: [] } },