Skip to main content
Glama
Dmitriusan

mcp-jvm-diagnostics

by Dmitriusan

compare_heap_histos

Compare two Java heap histogram snapshots to identify memory growth patterns and detect potential leaks. Pinpoint classes with increasing instance counts between snapshots.

Instructions

Compare two jmap -histo snapshots taken at different times to detect memory growth patterns, leak candidates, and new allocations. Captures what is growing between snapshots.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesThe SECOND (later) jmap -histo output. Capture after reproducing the suspected leak or after running under load. Allow at least 5-10 minutes between snapshots — short gaps may not accumulate enough growth to distinguish real leaks from normal allocation churn. Use the same `jmap -histo:live` flag as the before snapshot for a fair comparison.
beforeYesThe FIRST (earlier) jmap -histo output. Capture from a stable baseline — before the suspected leak window or after application startup has settled. Use `jmap -histo:live <pid>` to force a GC before capturing, ensuring unreachable objects are excluded and the snapshot reflects true live objects.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does not explicitly state behavioral traits (e.g., read-only, destructive, permissions needed). However, the parameter descriptions offer good context on proper timing and flags, which partly compensates. Overall, some behavioral insight is present but it is not comprehensive.

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

Conciseness5/5

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

The description is two sentences, highly concise, and front-loaded with the core purpose. Every word adds value with no redundancy.

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

Completeness2/5

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

Given no output schema and moderate complexity, the description fails to explain the return format or what the comparison output looks like (e.g., delta report). It does not fully prepare an agent for what to expect after invocation, which is a significant gap for a comparison tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The tool description itself ('Compare two jmap -histo snapshots...') adds minimal parameter meaning beyond what the schema already provides. The schema descriptions are quite detailed, so the tool description does not need to compensate; a 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('compare') and resource ('jmap -histo snapshots'), and clearly states the goal ('detect memory growth patterns, leak candidates, and new allocations'). It distinguishes from sibling tools like 'analyze_heap_histo' which likely handles single histograms.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for comparing two snapshots, but does not explicitly state when to use it over alternatives (e.g., 'analyze_heap_histo' for single snapshot analysis). The parameter descriptions provide some usage hints (e.g., gap timing), but the main description lacks clear guidance on when to invoke this tool.

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/Dmitriusan/mcp-jvm-diagnostics'

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