Skip to main content
Glama
JackXuyi

Current operating environment

getUserInfo

Retrieve current system user details from the operating environment to identify active users and their configurations.

Instructions

获取当前系统的用户信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for getUserInfo tool: retrieves current user info using os.userInfo(), tmpdir, and homedir, then returns it as JSON text content.
    case "getUserInfo": { const userInfo = { userInfo: os.userInfo(), tmpdir: os.tmpdir(), homedir: os.homedir() }; return { content: [{ type: "text", text: JSON.stringify(userInfo, null, 2) }] }; }
  • src/index.ts:64-72 (registration)
    Registration of the getUserInfo tool in the listTools response, including name, description, and empty input schema.
    { name: "getUserInfo", description: "获取当前系统的用户信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema for getUserInfo tool: empty object with no properties or requirements.
    inputSchema: { type: "object", properties: {}, required: [] }

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