Skip to main content
Glama

get_memory_info

Retrieve memory usage information for Java processes by specifying a process ID to monitor JVM heap and performance metrics.

Instructions

获取内存使用情况

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

        Returns:
            Dict: 包含内存信息的字典,包含以下字段:
                - 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 does describe the return format (a dictionary with specific fields) and mentions that an empty pid string will return an error, which adds useful behavioral context. However, it doesn't cover important aspects like whether this is a read-only operation, potential side effects, performance characteristics, or error handling beyond the empty string case.

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 appropriately sized and well-structured with clear sections for Args and Returns. While it could be slightly more concise in the parameter explanation, every sentence adds meaningful information. The structure helps with readability and comprehension.

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

Completeness3/5

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

For a single-parameter tool with no annotations and no output schema, the description provides adequate coverage of the parameter semantics and return format. However, it lacks context about when to use this tool versus alternatives, and doesn't fully address behavioral aspects like whether this is a safe read operation or has any side effects, which would be important for an agent to know.

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?

With 0% schema description coverage and only one parameter, the description fully compensates by providing detailed semantic information about the pid parameter. It explains the parameter accepts string format, supports decimal and hexadecimal formats, and that an empty string will return an error. This adds significant value beyond what the bare schema provides.

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 as '获取内存使用情况' (get memory usage information), which is a specific verb+resource combination. However, it doesn't distinguish this tool from potential alternatives or similar tools in the sibling list like get_jvm_info or get_jvm_status that might also provide memory-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?

The description provides no guidance on when to use this tool versus alternatives. While it documents the pid parameter, it doesn't mention when this tool should be used instead of other sibling tools like get_jvm_info or list_java_processes, nor does it provide any context about prerequisites or typical use cases.

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