dump_stacks
Inspect the current Python call stacks of a running process to diagnose blocks or performance issues, with support for JSON output and native frames.
Instructions
Dump the current Python call stacks of a process.
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": "dump_stacks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | Process ID to inspect. | |
| native | No | Include native frames if supported. | |
| json_output | No | Return structured JSON instead of human-readable text. | |
| locals_level | No | Number of times to pass --locals (0-2). Each level shows more locals. | |
| subprocesses | No | Include child Python processes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |