logname
Return the original login name of the current user, bypassing su/sudo. Helps identify the initial session identity for audit trails.
Instructions
Return the original login name of the current user (unaffected by su/sudo). Read-only, no side effects. Returns JSON with the login name. Use to determine the original session identity bypassing privilege escalation. Not for the effective user ID — use 'whoami'. See also 'whoami', 'id'.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "logname"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Write logname without a JSON envelope. |