Skip to main content
Glama

get_process_tree

Shows a process tree with parent-child hierarchy and depth information, enabling you to trace spawned children and understand process relationships. Optionally filter to a specific PID's subtree.

Instructions

Returns a flat process list with depth info showing parent-child hierarchy. Read-only from /proc//stat and /proc//comm. When pid is omitted, returns all processes rooted at init (ppid 0). When pid is provided, returns only that subtree. Invalid or missing PIDs return empty nodes with no error. Use to understand process hierarchy and trace spawned children; for per-process resource usage prefer get_process_info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNooptional PID to show subtree from (omit for full tree)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
totalYes
errorsNo
filteredNo
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral disclosure. It states the tool is read-only, sources data from /proc/*/stat and /proc/*/comm, and explains the exact behavior for invalid or missing PIDs (empty nodes with no error). This is rich behavioral context beyond the bare operation name.

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 compact and front-loaded, with the core behavior in the first sentence, followed by parameter semantics, edge-case behavior, and usage guidance. Every sentence earns its place, and there is no redundant filler.

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?

For a one-parameter tool with no annotations, the description covers purpose, input semantics, edge cases, safety/read-only status, and routing to an alternative. The presence of an output schema means return-value details need not be spelled out, so nothing critical 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?

The schema already covers the pid parameter at 100% with a description. The tool description adds further meaning by explaining the full-tree vs. subtree behavior, the init (ppid 0) rooting, and the invalid-PID fallback, which is valuable clarification beyond what the schema provides.

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 names a specific verb and resource: 'Returns a flat process list with depth info showing parent-child hierarchy.' It clearly identifies the tool's purpose and distinguishes it from siblings by naming get_process_info for resource usage, so an agent can tell it apart from related process tools.

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 the tool ('Use to understand process hierarchy and trace spawned children') and when to prefer an alternative ('for per-process resource usage prefer get_process_info'). It also clarifies pid omission vs. provision, giving the agent exact selection guidance.

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

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/Mohabdo21/linux-mcp'

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