Skip to main content
Glama

Current operating environment

getUserInfo

Retrieve detailed user information from the current operating environment to analyze system status or monitor active sessions.

Instructions

获取当前系统的用户信息

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "required": [], "type": "object" }

Implementation Reference

  • Handler for the getUserInfo tool. Retrieves current user information using os.userInfo(), temporary directory with os.tmpdir(), and home directory with os.homedir(). Returns the information as a JSON string in the tool response format.
    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 tools list returned by the ListToolsRequest handler. Includes the tool name, description, and input schema (empty object).
    { name: "getUserInfo", description: "获取当前系统的用户信息", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema for the getUserInfo tool, which is an empty object with no properties or required fields.
    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