analyze_threads
Analyze thread dumps from a Java process to identify lock contention and deadlocks, optionally returning structured JSON for lock-wait chains.
Instructions
Thread dump (jstack -l). Default: plain text. Set structured=true for JSON lock-wait chains (live snapshot). Historical contention: profile_jfr_locks. Deadlock cycle: check_deadlock.
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": "analyze_threads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | Process ID of the Java application. Get this from list_java_processes. | |
| topN | No | Maximum number of threads to include in the output. Default: 10. Increase for applications with many threads. | |
| structured | No | Return structured JSON with lockWaitChains instead of plain-text dump. Default: false. |