Skip to main content
Glama
JackXuyi

Current operating environment

getUsbInfo

Retrieve USB device information from the current operating environment to identify connected hardware and troubleshoot connectivity issues.

Instructions

获取当前设备的 USB 设备信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler implementation for the getUsbInfo tool. It calls si.usb() from the systeminformation library to fetch USB information and returns it as a JSON string in the tool response format.
    case "getUsbInfo": { const usbInfo = await si.usb(); return { content: [{ type: "text", text: JSON.stringify(usbInfo, null, 2) }] }; }
  • src/index.ts:235-243 (registration)
    Registration of the getUsbInfo tool in the tools list returned by handleRequest, including name, description, and empty input schema.
    { name: "getUsbInfo", description: "获取当前设备的 USB 设备信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema for getUsbInfo tool, which is an empty object (no parameters required).
    inputSchema: { type: "object", properties: {}, required: [] }
  • Import of the systeminformation library (si), used by getUsbInfo and other tools to fetch USB info.
    import si from 'systeminformation'; // 导入 systeminformation 库

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JackXuyi/env-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server