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: []
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. '获取' (get/retrieve) implies a read-only operation, but there's no information about what specific user information is returned, whether authentication is required, potential rate limits, or the format/structure of the response. The description is too minimal for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese that directly states the tool's purpose. There's zero wasted language or unnecessary elaboration. It's appropriately sized for a simple retrieval tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations, no output schema, and the description's minimal nature, this is incomplete for a system information retrieval tool. While simple (0 parameters), the description doesn't explain what 'user information' encompasses (username, UID, home directory, etc.) or provide any context about the response format, making it inadequate for an agent to understand what will be returned.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and the schema already fully documents this. No additional parameter information is needed or provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '获取当前系统的用户信息' clearly states the verb ('获取' - get/retrieve) and resource ('当前系统的用户信息' - current system's user information), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like getPlatformInfo or getHardwareInfo, but the specificity of 'user information' provides reasonable distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools retrieving different types of system information (CPU, memory, network, etc.), there's no indication of what 'user information' specifically includes or when this tool is appropriate versus other system info tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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