Skip to main content
Glama
kengrary

JVMind MAT Heap Dump Analyzer

Top memory consumers

mat_top_consumers
Read-onlyIdempotent

Find high-retained individual objects plus retained-size breakdowns by class, class loader, and package to quickly see which components drive heap usage after an overview.

Instructions

Read-only Top Consumers report: biggest individual objects plus retained-size breakdowns by class, class loader, and package. Use this as a quick 'who is using the most memory' overview after mat_overview. Prefer mat_histogram when you need a sortable list of every class with instance counts and shallow/retained sizes, and mat_dominator when you need to walk the object graph downward from a specific parent object. Requires the report_id of a parsed dump (status=DONE).

Input Schema

NameRequiredDescriptionDefault
report_idYesReport ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / report_id / description
      Added value: +"Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE)."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and closed-world; the description corroborates rather than contradicts ('Read-only'). It adds useful context beyond annotations: the report's content scope and the hard prerequisite that parsing must have reached status=DONE. It omits depth/limit or pagination behavior for the object list, which is the only remaining gap.

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?

Four sentences, each doing distinct work: purpose/content, placement in the workflow, sibling exclusions, and the DONE prerequisite. Front-loaded with the core definition before the routing advice.

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

Completeness5/5

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

For a single-parameter read tool with an output schema, full annotation coverage, and documented prerequisites, nothing an agent needs to select or invoke it correctly is missing. Return-value shape is handled by the output schema, so the description rightly does not repeat it.

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?

Only one parameter, and schema coverage is 100% — the schema already documents report_id including the status=DONE requirement verbatim. The description restates the same prerequisite without adding format or sourcing detail beyond it (e.g. that it comes from open_heapdump or dump_java_heap). Baseline 3 is appropriate since the schema carries this fully.

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?

States a specific verb and resource ('Read-only Top Consumers report') and enumerates exactly what it returns: biggest individual objects plus retained-size breakdowns by class, class loader, and package. This is clearly distinguishable from mat_histogram and mat_dominator, which are named.

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

Usage Guidelines5/5

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

Gives explicit routing: use after mat_overview as a 'who is using the most memory' overview, use mat_histogram for a sortable per-class list, use mat_dominator to walk the graph downward from a parent object. Both alternatives and their selecting conditions are named, plus a prerequisite (report_id of a DONE parse).

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