Skip to main content
Glama

Get Process Tree

get_process_tree

Retrieve the full process tree for a given PID to trace parent-child relationships and diagnose how processes are spawned or nested.

Instructions

返回指定进程所处的完整进程树。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a read/query operation but does not state read-only safety, permission requirements, failure modes, or whether the tree is exhaustive or costly.

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 a single front-loaded sentence with no filler. It is appropriately sized for a one-parameter query tool.

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

Completeness3/5

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

An output schema exists, so the description need not explain return values. However, with no annotations and no parameter description, it omits usage routing and pid semantics, leaving meaningful gaps for an agent comparing sibling tools.

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

Parameters2/5

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

Schema description coverage is 0% and the only parameter is pid. The description mentions '指定进程' (specified process), minimally mapping pid to a process identifier, but adds no format, source, or OS-specific semantics; it does not compensate for the missing schema documentation.

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

Purpose4/5

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

The description states a specific verb (返回) and resource (完整进程树) scoped to a specified process, so an agent can understand that this tool retrieves process ancestry. It does not, however, differentiate itself from siblings such as kill_process_tree or get_process_ports.

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

Usage Guidelines2/5

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

There is no explicit when-to-use, when-not-to-use, or alternative guidance. The agent must infer from the name and sibling list that this is for inspecting process ancestry rather than killing processes or listing ports.

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