Skip to main content
Glama

users/list

Read-onlyIdempotent

List local user accounts (UID, GID, home, shell, groups) from /etc/passwd and /etc/group, sorted by UID. Read-only; min_uid excludes system accounts.

Instructions

Lists local user accounts from /etc/passwd and /etc/group (uid, gid, home, shell, supplementary group memberships), sorted by uid. Read-only. Never reads /etc/shadow - this reports account identity, not credentials. Local files only: LDAP/SSSD users are not listed. min_uid (e.g. 1000) hides system accounts. Text lines look like name (uid=N gid=N(group)) home=... shell=... groups=a,b; output_format: json returns an array of objects (username, uid, gid, group_name, comment, home_dir, shell, groups). For who logged in use logs/logins, for your own root grants auth/sudo-rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
min_uidNoOnly include users with UID >= this value (e.g. 1000 to exclude system accounts)
privilegedNoRun as root. Needs a grant for this tool in mcp-sudo.yaml, otherwise refused
output_formatNoUse json for structured output (yaml, table and wide return the same JSON); default is text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.1
    • changedInput schema / properties / output_format / description
      Previous value: -"Desired output format (e.g. json, yaml, table, wide). Defaults to text"New value: +"Use json for structured output (yaml, table and wide return the same JSON); default is text"
    • changedInput schema / properties / privileged / description
      Previous value: -"Set to true to run as root"New value: +"Run as root. Needs a grant for this tool in mcp-sudo.yaml, otherwise refused"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description still adds real behavioral context beyond that: the exact source files, that /etc/shadow is never read, and that results are sorted by uid with local-only scope. It stops short of discussing cost or auth mechanics, keeping it just below top marks.

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 verb and source are front-loaded, followed by scope guardrails, output formats, and routing. Despite being a dense single paragraph, every clause carries distinct information with no filler or repetition of the annotations.

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?

With no output schema, the description fully compensates by documenting both text and JSON return shapes and field names. Purpose, scope limits, exclusions, and alternatives are all covered, leaving nothing an agent needs to call this correctly.

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?

Schema coverage is 100%, so the baseline is 3. The description nevertheless adds meaning beyond the schema by showing the text output shape and naming the JSON object fields (username, uid, gid, group_name, comment, home_dir, shell, groups), and by giving a concrete min_uid example.

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?

States a specific verb (Lists) and resource (local user accounts from /etc/passwd and /etc/group), enumerates the fields returned, and names the sibling tools (logs/logins, auth/sudo-rules) it is not. An agent can distinguish this from every sibling without opening a schema.

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?

Gives explicit when-to-use routing ('For who logged in use logs/logins, for your own root grants auth/sudo-rules') and a clear exclusion ('LDAP/SSSD users are not listed'). min_uid's role in hiding system accounts is also stated, so selection conditions are unambiguous.

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