getPlatformInfo
Retrieve system platform details like OS type, version, and architecture to configure applications or diagnose compatibility issues.
Instructions
获取当前系统的平台信息
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:286-302 (handler)The handler function for the 'getPlatformInfo' tool, which collects platform details using Node.js 'os' module and returns them 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:29-35 (schema)Schema definition for the 'getPlatformInfo' tool, specifying an empty input object schema.name: "getPlatformInfo", description: "获取当前系统的平台信息", inputSchema: { type: "object", properties: {}, required: [] }
- src/index.ts:28-36 (registration)Registration of the 'getPlatformInfo' tool in the list of tools returned by ListToolsRequestHandler.{ name: "getPlatformInfo", description: "获取当前系统的平台信息", inputSchema: { type: "object", properties: {}, required: [] } },