Skip to main content
Glama

processes/list

Read-onlyIdempotent

List Linux processes with PID, user, state, RSS, and command from /proc, then filter by user or PID and sort by memory to find or inspect a running process.

Instructions

Lists processes (PID, PPID, user, state, RSS, command) read from /proc. Read-only. Use it to find a PID, filter by user or one pid, or sort by memory. For the CPU/memory header and %CPU on every row use processes/top; for the process that owns a port network/connections; to signal a process processes/delete; for deep per-PID metrics the process://<pid>/<target> resource. Sorted by PID unless sort_by is mem (RSS, largest first) or cpu (samples for 0.5 s, so the call takes at least that long, and only then does cpu_percent appear); limit applies after sorting. Kernel threads appear as [name]. Command lines can contain secrets passed as arguments. Text output is a table; output_format: json returns an array of objects (pid, user, comm, state, ppid, rss_bytes, cmdline, cpu_percent). Sizes are bytes unless human_readable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNoFilter to a single specific PID
userNoExact username
limitNoMaximum rows returned, applied after sorting
sort_byNopid (default), mem (RSS, largest first) or cpu (samples for 0.5 s)
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
human_readableNoRSS like 10Mi; default is bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.4.1
    • changedInput schema / properties / limit / description
      Previous value: -"Limit returned processes"New value: +"Maximum rows returned, applied after sorting"
    • 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"
    • changedInput schema / properties / sort_by / description
      Previous value: -"Sort by cpu, mem, or pid"New value: +"pid (default), mem (RSS, largest first) or cpu (samples for 0.5 s)"
    • changedInput schema / properties / user / description
      Previous value: -"Filter by username"New value: +"Exact username"
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnly, idempotent, non-destructive); the description goes well beyond that by disclosing that cpu sorting samples for ~0.5 s and only then emits cpu_percent, that limit is applied after sorting, that kernel threads render as [name], that cmdlines can leak secrets, and how output_format changes the shape. These are non-obvious behavioral traits an agent cannot infer elsewhere.

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

Conciseness4/5

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

Information-dense and front-loaded with the core purpose and result fields before branching into alternatives and behavior. The paragraph is long but nearly every clause carries new constraints; only marginal tightening is possible.

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 compensates by naming the JSON array fields, noting the text-table default, and explaining sort/limit interaction and the conditional cpu_percent column. Nothing an agent needs to invoke or interpret results is missing.

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, but the description adds real meaning: sort_by semantics (RSS largest-first, cpu costs 0.5 s), limit-after-sorting ordering, human_readable vs bytes, and the note that yaml/table/wide all collapse to JSON. That extra context lifts it above the schema baseline, though it stops short of covering every parameter.

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 and resource ('Lists processes') and enumerates the exact fields returned (PID, PPID, user, state, RSS, command), plus names the data source (/proc). It explicitly distinguishes itself from siblings (processes/top, network/connections, processes/delete, the process:// resource), so an agent can pick it without opening any 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 concrete use cases ('find a PID, filter by user or one pid, or sort by memory') and routes each alternative scenario to the correct sibling tool. This is close to an ideal when-to-use map for a crowded processes/* namespace.

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