Skip to main content
Glama

whoami

Read-only

Return the effective user identity (username, UID, GID) as JSON to verify permissions before sensitive operations.

Instructions

Return the effective user identity (username, UID, GID) of the current process as JSON. Read-only, no side effects. Use to determine which user the agent is running as before performing permission-sensitive operations. Not for the original login identity — use 'logname' to bypass su/sudo. Not for full identity details — use 'id' for all groups. See also 'id', 'logname'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoWrite the user name without a JSON envelope.
Behavior4/5

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

The description states 'Read-only, no side effects,' which aligns with the readOnlyHint annotation and adds explicit clarity, though the annotation already conveys the read-only nature.

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 concise, using four short sentences that front-load the main purpose and then provide usage guidance and alternatives without unnecessary words.

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

Completeness5/5

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

Given the tool's simplicity (one optional param, no output schema), the description covers the return format, usage context, and relevant alternatives, making it complete.

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

Parameters3/5

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

The 'raw' parameter is well-described in the schema, and the description mentions the default JSON output, but it doesn't add significant extra meaning beyond what the schema already provides (100% coverage).

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

Purpose5/5

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

The description clearly states the tool returns the effective user identity (username, UID, GID) as JSON, distinguishing it from sibling tools like 'id' and 'logname'.

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

Usage Guidelines5/5

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

The description explicitly states when to use (before permission-sensitive operations) and when not to use (for login identity or full details), with named alternatives 'logname' and 'id'.

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/caseSHY/AI-CLI'

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