get_stack_trace
Analyze Java thread stack traces by specifying process ID, thread ID, or top CPU-consuming threads. Identify blocking threads and customize sampling intervals for detailed JVM diagnostics in the MCP environment.
Instructions
获取线程堆栈信息
Args:
pid: 进程ID
thread_id: 线程ID,如果指定则只显示该线程的堆栈
top_n: 显示最忙的前N个线程
find_blocking: 是否查找阻塞其他线程的线程
interval: CPU使用率统计的采样间隔(毫秒),默认200ms
show_all: 是否显示所有线程
Input Schema
Name | Required | Description | Default |
---|---|---|---|
find_blocking | No | ||
interval | No | ||
pid | Yes | ||
show_all | No | ||
thread_id | No | ||
top_n | No |
Input Schema (JSON Schema)
{
"properties": {
"find_blocking": {
"default": false,
"title": "Find Blocking",
"type": "boolean"
},
"interval": {
"default": null,
"title": "Interval",
"type": "integer"
},
"pid": {
"title": "Pid",
"type": "integer"
},
"show_all": {
"default": false,
"title": "Show All",
"type": "boolean"
},
"thread_id": {
"default": null,
"title": "Thread Id",
"type": "integer"
},
"top_n": {
"default": null,
"title": "Top N",
"type": "integer"
}
},
"required": [
"pid"
],
"title": "get_stack_traceArguments",
"type": "object"
}