Skip to main content
Glama

get_thread_info

Retrieve thread information for a Java process by providing its process ID (PID). Returns thread details, count, and diagnostic data for JVM monitoring and analysis.

Instructions

获取指定进程的线程信息

        Args:
            pid (str): 进程ID,使用字符串形式(如:"12345")。
                支持十进制和十六进制格式。
                空字符串将返回错误信息。

        Returns:
            Dict: 包含线程信息的字典,包含以下字段:
                - threads (List[Dict]): 线程信息列表
                - thread_count (int): 线程数量
                - raw_output (str): 原始输出
                - timestamp (float): 时间戳
                - success (bool): 是否成功
                - error (Optional[str]): 错误信息
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the return format in detail (including success/error fields and raw output), which is helpful. However, it doesn't mention potential side effects, performance characteristics, authentication requirements, or rate limits that would be important for a system-level tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections for purpose, arguments, and returns. It's appropriately sized with no wasted sentences, though the Chinese-only format might limit accessibility for some agents. Every sentence adds value.

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

Completeness4/5

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

Given the single parameter and no output schema, the description provides complete parameter documentation and detailed return value specification. It covers the essential information needed to use the tool effectively, though additional context about when to use it versus sibling tools would improve completeness.

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

Parameters5/5

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

The description provides comprehensive parameter information beyond the minimal schema. It explains that 'pid' accepts string format (including decimal and hexadecimal), clarifies that an empty string returns an error, and provides format examples. This significantly compensates for the 0% schema description coverage.

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 clearly states the tool's purpose: '获取指定进程的线程信息' (Get thread information for a specified process). It uses a specific verb ('获取' - get) and resource ('线程信息' - thread information), but doesn't explicitly differentiate from sibling tools like 'get_jvm_info' or 'get_stack_trace', which also retrieve process-related information.

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?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention sibling tools like 'get_jvm_info' or 'get_stack_trace' that might provide overlapping or complementary information, nor does it specify use cases or prerequisites beyond needing a process ID.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xzq-xu/jvm-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server