process_tree
Show a process's ancestors and all descendants as a tree before killing it, so you can see which parent may restart a child and which processes listen on ports.
Instructions
Show a process's ancestors (who started it) and all its descendants, as a tree.
Each node lists name, PID and a shortened command line, and marks processes that are listening on a port. Use it before killing: killing a child can be undone by its parent restarting it (npm, nodemon, a reloader, a service manager).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pid": "<pid>"
},
"name": "process_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |