JVMind MAT Heap Dump Analyzer
A local stdio MCP server that brings Eclipse Memory Analyzer (MAT) heap-dump analysis into Claude Desktop, Cursor, and VS Code, so an AI agent can open or capture a Java heap dump and run MAT-style diagnostics — all dumps stay on the machine.
Open & manage dumps —
open_heapdump(by absolute.hprofpath),get_heapdump_status(poll parse progress),list_heapdumps,close_heapdump(optionally stop the MAT helper).Live capture —
list_java_processesto discover attachable JVMs,dump_java_heapto preview then capture a live heap dump (jmap -dump:live, warn: triggers Full GC) and auto-start parsing.Heap overview —
mat_overviewfor used/committed/live heap, object/class/classloader counts, JDK version, and leak-suspect count.Structure exploration —
mat_histogram(sort by shallow/retained/count),mat_dominator(dominator tree with parent drill-down),mat_top_consumers(biggest retained objects/classes).Object-level inspection —
mat_object(fields, statics, in/out refs, GC root),mat_path2gc(shortest path to a GC root, excluding weak/soft by default).Thread analysis —
mat_threads(threads → stack frames → frame locals),mat_threadlocals(grouped by value class or thread, for ThreadLocal leaks),mat_sql_in_threads(SQL in thread stacks).Leak & OOM diagnostics —
mat_leak_suspects(LeakHunter),mat_diagnose_oom(composite: suspects + SQL in threads + dominators),mat_connection_pools(active/idle counts and connections held past a threshold).Ad-hoc queries —
mat_oqlto run OQL, returning rows plus a reusable result set id (slow, and can read arbitrary heap strings, so treat output as private).Privacy/safety — heap dumps never leave the machine, MAT helper binds to 127.0.0.1 only; tools take a
report_id, and live capture requires explicitconfirm=true.
JVMind × MAT — Heap Dump Analysis
English | 中文
Java heap dump analysis built on the Eclipse Memory Analyzer (MAT) engine: upload → parse → MAT-like web queries → domain diagnostics (connection-pool leaks and more) → natural-language agent diagnosis.
Status: the Java parser and query service are tested. MCP Server
v0.2.1is published on PyPI and the official MCP Registry. Python platform integration is still in progress. See PROJECT-STATUS.md.
Quick start
Project overview → this file +
mat-study/README.md(the design blueprint; Chinese).Current progress → PROJECT-STATUS.md (completed work, remaining tasks, lessons learned).
Python team onboarding → TODO-PYTHON-TEAM.md (task list, API contract, acceptance criteria).
Run the query service → query-service/DEPLOY.md (deploy + curl verification).
Run the parser → parser-cli/v1-parsehd/README.md (no build required; uses the MAT distribution).
Analyze heap dumps from Claude/Cursor/VS Code → mcp-server/README.md (
uvx jvmind-mat-mcp, local stdio).
Related MCP server: javaperf
MCP Server (published)
A local stdio MCP server that exposes MAT heap analysis to Claude Desktop,
Cursor, and VS Code. It can discover local Java processes and capture a live
heap dump from a running JVM, or open an existing .hprof file. Heap dumps
never leave the machine; the MAT helper binds to 127.0.0.1 only.
uvx jvmind-mat-mcp doctor # checks JDK 21 / MAT 1.17 / permissionsChannel | Location |
PyPI | |
Official MCP Registry |
|
MCPRush | https://mcprush.com/kengrary/jvmind-mat-heap-dump-analyzer-mcp |
Documentation |
Capabilities: list_java_processes / dump_java_heap for live capture,
open_heapdump for existing files, then mat_overview / mat_histogram /
mat_dominator / mat_threads / mat_object / mat_path2gc / mat_oql /
mat_leak_suspects / mat_diagnose_oom and more — 19 tools in total.
Requirements: Python 3.10+, JDK 21+, Eclipse MAT 1.17.x (a small query bundle is installed into MAT on first use).
Tools
All analysis tools take the report_id returned by open_heapdump.
open_heapdump— open a local.hprof, start background indexing, return areport_idget_heapdump_status— poll parse status, progress, and phaselist_heapdumps— list heap dumps known to this MCP serverclose_heapdump— release a heap dump handle and optionally stop the MAT helperlist_java_processes— discover local attachable JVMs (pid, main class, command; MAT helper excluded)dump_java_heap— preview and capture a live heap dump, then start MAT parsing (confirm=true)mat_overview— heap overview: used/committed/live heap, object/class/classloader counts, JDK versionmat_histogram— class histogram sorted by shallow, retained, or object countmat_dominator— dominator tree of the largest retained objects, with parent drill-downmat_threads— list threads or drill into stack frames and frame localsmat_threadlocals— inspect ThreadLocal values grouped by value class or threadmat_object— inspect a single object's fields, statics, references, and GC rootmat_path2gc— shortest path from an object to a GC rootmat_oql— run an OQL query and return rows plus a reusable result set idmat_leak_suspects— run LeakHunter and return suspects with retained sizes and descriptionsmat_diagnose_oom— composite OOM diagnosis: leak suspects + SQL in threads + dominator analysismat_connection_pools— diagnose database connection pools and leaked connectionsmat_top_consumers— top memory consumers by retained heapmat_sql_in_threads— find SQL statements in thread stacks
Architecture
User uploads a heap dump
│
[Python/FastAPI] ← in progress (TODO-PYTHON-TEAM.md)
upload / queue / progress / auth / agent
├── fork ─────────────▶ [parser-cli / V1] hprof → *.index ✅ tested
│ (writes to NFS)
└── reverse proxy ────▶ [query-service] queries over indexes ✅ tested
(OSGi bundle, :8090)
histogram / dominators / threads / OQL
+ Leak Suspects / path2gc etc.
Shared: NFS (dump files) + PostgreSQL (tasks/reports)
Local MCP path (v0.2.1 published):
Claude Desktop / Cursor / VS Code
│ stdio
▼
[mcp-server] ──HTTP 127.0.0.1──▶ [query-service :8090]
└── runs MAT ParseHeapDump when index files are missing
(reuses the parser-cli V1 logic)Repository layout
Top level
File | Contents |
English overview (this file) | |
Chinese overview | |
Milestones, module status, TODOs, lessons learned | |
Python integration task list, API contract, acceptance |
mat-study/ — design documents (Chinese)
# | Document | What it covers |
— | Design blueprint (four-layer architecture, decisions, milestones) | |
01 | How MAT works and how to reuse it; index file format | |
02 | Dominator tree, paths, retained size; web backend design | |
03 | What else a heap dump can answer; pools, thread pools, classloaders | |
04 | How an LLM drives MAT; tool granularity and output trimming | |
05 | Upload, queue, progress, three-layer soft-reference cache | |
06 | Finalized choices and the four-view API contract | |
07 | How to connect to the existing platform (required for the Python team) | |
08 | 57 queries reviewed; gap priorities | |
09 | Making the web UI feel like MAT | |
10 | Inspector features and what is already implemented | |
12 | Phased plan for the Python side | |
13 | Finding the OOM-triggering thread and its SQL | |
14 | Endpoint mapping, async state machine, integration rules |
parser-cli/ — parsing layer (hprof → index)
File | Contents |
Parser overview (V1/V2 routes) | |
How to obtain MAT dependencies, version/JDK matrix, bundle list | |
V1 (zero build; MAT distribution + text progress) — current | |
V1 verification report (real hprof, three bugs fixed) | |
| Progress parser (Python; reusable by the worker) |
| Worker snippet for calling the parser |
| V2 skeleton (self-built jar + JSONL progress; not active) |
query-service/ — query layer (OSGi bundle, :8090) ✅
File | Contents |
Service overview (endpoints, SnapshotManager, route 2) | |
Deploy + end-to-end verification (bundles.info + | |
Embedded Equinox test and CNF fix (why route 2) | |
Build troubleshooting (p2 repositories, JDK versions) | |
| Service implementation: core/http/model/task/view/equinox |
mcp-server/ — local stdio MCP (✅ v0.2.1 published)
File | Contents |
Install, client config, 19 tools, privacy, troubleshooting | |
| MCP SDK tool registration |
| Heap dump registry, background parsing, MAT lifecycle |
| Query-service OSGi bundle shipped with the package |
Glama review image (MAT/JDK not included; mount at runtime) | |
| Unit tests, stdio protocol tests, optional real-MAT integration tests |
marketplace/ — directory submission pack (🟡 prepared, not submitted)
File | Contents |
Platform status, remaining steps, quality gaps | |
Shared name, description, tags, install command | |
| MCPB manifest (Smithery skipped, kept for later) |
Form copy and steps per platform |
Module status
Module | Form | Status | Entry point |
parser-cli | V1 = MAT command; V2 = standalone jar | ✅ V1 tested |
|
query-service | OSGi bundle (HTTP :8090) | ✅ tested |
|
mcp-server | Python stdio MCP (PyPI + official Registry) | ✅ v0.2.1 published |
|
marketplace | Directory copy (Smithery skipped) | 🟡 prepared, pending submission |
|
Python integration | FastAPI + DB + agent | ⏳ in progress |
|
Key facts (avoid re-learning these)
MAT dependencies are not on Maven Central → use Tycho (
eclipse-plugin) with a p2 repository or a local Directory target; do not add<dependencies>.Version ↔ JDK: 1.17 → JDK 21, 1.14 → JDK 17, 1.12 → JDK 11 (keep all three places in sync).
Deployment: copy the jar into
plugins/, add a line tobundles.info(auto-start=true), and restart with-clean(notdropins/).The query service has no authentication and is intranet-only. The Python proxy injects
dumpDir(= the dump directory).Reopening a dump requires both the hprof and index files on a seekable filesystem (NFS works).
MCP package
jvmind-mat-mcp; Registry nameio.github.kengrary/jvmind-mat. After changing the Java query layer, rerunmcp-server/scripts/vendor-bundle.sh, otherwise the wheel ships a stale bundle.On first use the MCP server writes
com.jvmind.mat.queryinto MAT'splugins/andbundles.info; the MAT install must be writable.Live capture uses
jmap -dump:live: it dumps only live objects, triggers a Full GC, and may pause the target JVM. The default output is the server's current working directory; override it withJVMIND_MCP_DUMP_DIRor the tool'soutput_dir.Smithery is skipped for now: its web UI only exposes remote HTTPS URLs and the CLI server-creation endpoint was removed. MCPB artifacts are kept for a later retry. The Docker image is for directory review; real analysis still needs MAT + JDK 21 on the host.
Tech stack
Parsing/query: Java 21 + Eclipse MAT 1.17 (OSGi/Equinox)
MCP server: Python 3.10+ / MCP Python SDK 2.x /
uv/ stdioPlatform/agent: Python + FastAPI (the existing JVMind platform)
Storage: NFS (dump files) + PostgreSQL (tasks/reports)
Distribution: PyPI + official MCP Registry; mcp.so, Glama, and PulseMCP materials are prepared; Smithery is skipped
License: MIT for this project (see LICENSE); Eclipse MAT is EPL-2.0 and is not redistributed
Available Tools
19 toolsclose_heapdumpA
Release a heap dump handle. Set stop_service=true to also stop the MAT helper process. / 释放堆转储句柄;stop_service=true 时同时停止 MAT 辅助进程。
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | ||
| stop_service | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the full behavioral burden. It usefully discloses the side effect of stopping the MAT helper process, but leaves major questions open: whether the underlying dump file is deleted or retained, whether the report_id becomes invalid afterward, and whether the operation is reversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core action is front-loaded and the sentence is tight; the bilingual mirror doubles the text length but adds no redundant concepts. No filler sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values need not be explained. For a two-parameter lifecycle tool the description covers the action and the one non-obvious side effect; only the provenance of report_id and the fate of the dump file are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description has to compensate for both parameters. It fully explains stop_service's effect, but report_id gets no explanation at all (presumably an ID from open_heapdump or list_heapdumps) — half the parameters remain undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ("Release a heap dump handle") that pairs cleanly with the sibling open_heapdump, so the agent can infer the open/close lifecycle. It does not explicitly name or distinguish itself from get_heapdump_status or list_heapdumps, but the intent is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: you release a handle after opening one. The one piece of explicit guidance is conditional on a parameter ("Set stop_service=true to also stop the MAT helper process"), with no statement of prerequisites, when not to call it, or how it relates to get_heapdump_status.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
dump_java_heapADestructive
Capture a LIVE heap dump from a running JVM and start MAT parsing. First call with confirm=false (default) to preview the target, output directory, disk space, and timeout; call again with confirm=true to execute. A live dump triggers a Full GC and may pause the target JVM. The dump is written to output_dir (default: current working directory) and is automatically opened for MAT parsing. / 从运行中的 JVM 抓取 live 堆转储并自动开始 MAT 解析。先用默认 confirm=false 预览目标、输出目录、磁盘空间和超时,再用 confirm=true 执行。live dump 会触发 一次 Full GC,可能暂停目标 JVM;默认输出到当前目录。
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | ||
| confirm | No | ||
| timeout | No | ||
| output_dir | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already flag this as destructive, non-idempotent, and not read-only, and so the description goes further by disclosing the exact risk: a live dump triggers a Full GC and may pause the target JVM. It also states the output location default (current working directory) and that the result is auto-opened for MAT parsing, which an agent cannot infer from the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well front-loaded: purpose first, then the confirm protocol, then the safety warning. The main waste is that the entire block is repeated verbatim in Chinese, roughly doubling length without adding information for an English-reading agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive, non-idempotent tool this covers the essentials an agent needs to act safely, and the presence of an output schema removes any obligation to describe return values. The remaining gaps are minor: pid and timeout semantics, and what happens if the dump fails or disk space is insufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description carries the full burden, and it does well for confirm (default false, preview vs execute) and output_dir (defaults to cwd). However, pid is only gestured at via "preview the target," and timeout is mentioned solely as something previewed, with no units or meaning (per-operation? per-phase?) — half the parameters remain semantically thin.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource ("Capture a LIVE heap dump from a running JVM") plus the chained side effect ("start MAT parsing"). The emphasis on LIVE and "running JVM" implicitly separates it from open_heapdump, which operates on existing files, so an agent can tell the two apart without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It spells out a concrete two-phase calling protocol: call with confirm=false to preview target/output dir/disk space/timeout, then confirm=true to execute. That is strong contextual guidance, but it never names the alternative (open_heapdump, list_java_processes) for the case where the agent wants to attach to an existing dump or discover a pid first.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_heapdump_statusB
Get parse status and progress for a heap dump report. / 查询堆转储报告的解析状态与进度。
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses that this is a status/progress query, but it does not explain permissions, whether parsing is asynchronous, polling expectations, possible status values, or failure behavior for an invalid report_id.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded, with the core purpose stated immediately. However, the second sentence is a Chinese translation that duplicates the English content without adding semantic value for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a simple one-parameter query with an output schema, so return-format details are not required in the description. Still, it omits report_id guidance, usage context, and basic behavioral expectations, leaving it adequate but incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has one required parameter, report_id, and schema description coverage is 0%. The description only says 'for a heap dump report' and does not explain where report_id comes from, its expected format, or whether it matches IDs returned by dump/list tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Get') and resource ('parse status and progress for a heap dump report'). Sibling tools are list/open/close/dump operations or MAT analytics, none of which is a status/progress query, so an agent can distinguish this tool by purpose even without an explicit sibling reference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use guidance, no prerequisites, and no named alternatives. The word 'status' implies checking an existing report, but the description does not say when to poll this versus using list_heapdumps or other report tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_heapdumpsA
List heap dumps known to this MCP server with their status. / 列出本 MCP 服务已知的堆转储及其状态。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. Saying the result includes status is useful, and 'list' implies a read-only operation, but it doesn't clarify whether it returns only currently-open dumps or all known ones, nor anything about ordering, limits, or permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the resource and scope front-loaded and no filler. The bilingual duplication doubles the length, which is defensible for localization but doesn't add information for a single-language agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, parameterless discovery tool with an output schema documenting the return shape, the description covers what is needed to call it correctly. The remaining gap is the relationship to open/close/status siblings, which would help an agent place it in the workflow.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a 0-param tool applies. No parameter information is repeated or wasted.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List heap dumps') plus a scope qualifier ('known to this MCP server') and notes that status is included. It is clear on its own, but it does not distinguish itself from siblings like get_heapdump_status or open_heapdump, which an agent must still infer.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: listing is the natural discovery step before open_heapdump and get_heapdump_status, but the description never says when to call this versus those siblings or whether the listing is a prerequisite. No exclusions or conditions are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_java_processesARead-only
Discover local Java processes that can be attached for a live heap dump. Returns pid, main class, command, and masked JVM arguments. The managed MAT helper is excluded. / 主动发现本机可 attach 的 Java 进程,返回 pid、主类、命令行和已掩码的 JVM 参数;MAT 辅助进程会被排除。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds useful behavior beyond that: it returns pid, main class, command, and masked JVM arguments, and it explicitly excludes the managed MAT helper process.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The English description is front-loaded and efficient, first stating the purpose and then adding return details and the exclusion. The full Chinese translation duplicates the same content, which is useful for localization but prevents a perfect conciseness score because half the text is redundant for an agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is complete for a zero-parameter discovery tool. It explains what is listed, what is returned, that JVM arguments are masked, and that the managed MAT helper is excluded; the output schema can carry the full return structure.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so there is no parameter semantics to explain. The baseline score for a no-parameter tool is 4, and the schema is empty and complete as expected.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action and resource: discovering local Java processes that can be attached for a live heap dump. It also gives scope boundaries by saying the managed MAT helper is excluded, which helps distinguish it from sibling tools that list heap dumps or operate on existing dumps.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is clear: this is for finding local Java processes that can be attached for a live heap dump. It does not explicitly name follow-up alternatives such as open_heapdump or dump_java_heap, but the attach-for-live-heap-dump framing gives the agent enough context to infer the workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_connection_poolsB
Diagnose DB connection pools (active/idle counts + leaked connections held > thresholdMs). / 诊断数据库连接池(活跃/空闲数 + 持有超过 thresholdMs 的泄漏连接)。
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | ||
| thresholdMs | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It does disclose the core behavior - it counts active/idle connections and flags connections held longer than thresholdMs - but says nothing about whether it is read-only, what permissions or preconditions (loaded report) are needed, or how costly the scan is.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The English sentence is well front-loaded and waste-free, but the full Chinese translation doubles the length without adding information for an agent parsing English, diluting density.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, and the tool is small. Still, for a diagnostic tool with a mandatory report_id and 0% schema coverage, the description should at least identify what the report reference is and whether the operation is a safe read.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does define thresholdMs semantically (connections held longer than this are treated as leaked), which is real added value, but report_id - the only required parameter - is given no meaning at all beyond its name.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description pairs a specific verb, 'Diagnose', with a specific resource, 'DB connection pools', and enumerates the output (active/idle counts, leaked connections). No sibling tool covers connection pools, so it is distinct in practice, though the description never explicitly contrasts itself with the other mat_* diagnostic tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: an agent can infer it should call this when investigating pool exhaustion or leaks, but there is no explicit when-to-use, no prerequisites (e.g. that a parsed report must exist), and no guidance on when mat_leak_suspects or mat_top_consumers would be the better choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_diagnose_oomB
Run comprehensive OOM diagnosis (async) combining leak suspects + SQL-in-threads + dominator analysis. / 综合 OOM 诊断(异步),聚合泄漏嫌疑、线程中的 SQL、支配树分析。
| Name | Required | Description | Default |
|---|---|---|---|
| onlyRisky | No | ||
| report_id | Yes | ||
| culpritPct | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose one important trait: the operation is async. However, it gives no indication of how results are retrieved afterward (job handle, status tool, polling), expected runtime/cost, or whether repeated invocations on the same report_id reuse prior work. For an async aggregate of three expensive scans, those gaps matter.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences with the action front-loaded and no filler; the key 'async' qualifier and the aggregation list both appear immediately. The full English/Chinese duplication is redundant for a single-language reader but is a standard bilingual convention, so it is not a real defect.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-value shape need not be explained. Still, for a multi-analysis orchestration tool with an async contract and three undocumented parameters, the description omits the follow-up path (how to collect the async result) and the meaning of the tuning options, leaving an agent unable to call it well without opening the schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description mentions no parameters at all. Three parameters exist — report_id, onlyRisky (default true), and culpritPct (default 30) — and the description provides no meaning for any of them, notably leaving the semantics of onlyRisky and culpritPct entirely unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Run comprehensive OOM diagnosis') and enumerates exactly what it aggregates (leak suspects, SQL-in-threads, dominator analysis), which implicitly sets it apart from the individual sibling tools. It does not explicitly name those siblings, so an agent must infer the relationship, but the purpose itself is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The enumeration of the three analyses implies this is a one-call alternative to mat_leak_suspects / mat_sql_in_threads / mat_dominator, but no sibling is named and there is no explicit when-to-use/when-not guidance. Nothing says whether to prefer this aggregate for a first-pass triage versus calling the targeted tools for a focused question.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_dominatorB
Dominator tree: list biggest retained-heap dominators, drill down by passing parent objectId. / 支配树:列出 retained 最大的支配者,传 parent=objectId 可下钻。
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| parent | No | ROOT | |
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full burden. It does disclose implicit ordering ('biggest retained-heap dominators') and the hierarchical drill-down model, but says nothing about whether results are truncated, paging behavior, or cost of the traversal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single compact sentence pair with the core purpose front-loaded, plus a bilingual mirror that adds no new information cost. No filler text, though the duplicated Chinese rendering doubles length for no semantic gain.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Output schema exists so return values needn't be described, and the drill-down mechanic is covered. But for a 3-parameter tool with zero schema descriptors and no annotations, leaving report_id and top unexplained leaves an agent guessing about inputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description explains only 'parent' (pass an objectId to drill down). The required 'report_id' and the 'top' limit (default 20) are never addressed, and the schema's default value 'ROOT' for parent is not mentioned either.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Dominator tree: list biggest retained-heap dominators' with drill-down by parent. An agent can distinguish this from mat_histogram or mat_leak_suspects by the 'dominator tree' framing, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives concrete mechanics for one workflow ('drill down by passing parent=objectId') but never says when to choose this over mat_histogram or mat_leak_suspects, nor any prerequisites such as needing an open heapdump report first.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_histogramB
Class histogram sorted by shallow/retained/count. Top-N by default; pass top to override. objectSet reuses a prior OQL/RS result. / 按 shallow/retained/count 排序的类直方图,默认 Top-20。objectSet 可复用先前 OQL/RS 结果。
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| sort | No | retained | |
| objectSet | No | ||
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses useful behavioral traits: default Top-20, configurable sort, and objectSet reuse of prior results. It stops short of stating the safety profile, whether it reads vs mutates, or cost of computation, but as an analysis tool with an output schema this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The English sentence front-loads what the tool produces and then the parameters, with no wasted clauses. The mirrored Chinese sentence duplicates the same content, which is helpful for some audiences but adds length without new information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 4 parameters, no annotations, and an existing output schema, the description covers most of what is needed to call it, but the unexplained required report_id and the missing when-to-use guidance leave a meaningful gap for correct selection.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaning for top (override default N), sort (the three dimensions), and objectSet (reuses prior OQL/RS result), but leaves report_id and the sort default (retained) unexplained, so it only partially fills the gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific resource (class histogram) and the sort dimensions (shallow/retained/count), so an agent knows it produces a ranked class table. It doesn't explicitly contrast with siblings like mat_dominator or mat_top_consumers, but the histogram framing is reasonably distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It conveys that Top-N (default 20) applies and that top overrides it, and that objectSet reuses a prior OQL/RS result. However, there is no guidance on when to pick this over alternative analysis tools (mat_dominator, mat_top_consumers) or what report_id must reference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_leak_suspectsB
Run LeakHunter (async) — returns leak suspects with retained size and description. SLOW: may take a minute. / 运行 LeakHunter(异步),返回疑似泄漏点及 retained 大小与描述。慢查询,可能耗时数十秒。
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose two real traits: the operation is asynchronous and it is SLOW (may take a minute). It omits how results are retrieved after the async call (presumably via get_heapdump_status) and any permission or failure behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The English text is front-loaded and efficient: verb, return shape, then the latency warning. The full bilingual duplication roughly doubles length without adding information, a minor cost.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so the return shape needn't be explained, and the SLOW/async warning is valuable. But for an async tool, the description leaves a real gap: it never says the result must be polled or where to obtain it, which an agent needs before calling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter report_id has 0% schema description coverage, and the description does not explain what it is (a heapdump/report identifier) or where it comes from. Unlike the 0-parameter baseline of 4, this param needs prose support that is absent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource: runs LeakHunter and returns leak suspects with retained size and description. The resource is distinct from siblings like mat_dominator or mat_histogram, though it never explicitly contrasts itself with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to reach for this versus mat_dominator, mat_top_consumers, or other analysis tools; the leak-hunting framing implies usage but names no alternatives or prerequisites (e.g., that a heapdump must already be opened to supply report_id).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_objectB
Inspect a single object (class, fields, statics, in/out refs, GC root). Required: object id. / 检查单个对象(类、字段、静态字段、入/出引用、GC Root)。必须传 object id。
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. 'Inspect' implies a read operation and the listed aspects clarify what kind of information is returned, but it does not explicitly state read-only behavior, prerequisites, or whether any side effects exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded and extremely compact, with the core action and inspected categories stated first and the required object id called out immediately. The bilingual repetition is slightly redundant but does not introduce unnecessary noise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The presence of an output schema reduces the need to explain return values, and the description does list inspected object aspects. However, for a tool with two required parameters, zero schema description coverage, and no annotations, omitting the required 'report_id' parameter is a significant completeness gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain both parameters. It clarifies that 'id' is an object id, but it omits 'report_id', which is required by the schema, leaving one of two required parameters undocumented in the description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, 'Inspect', and resource, 'a single object', then enumerates the inspected aspects: class, fields, statics, in/out refs, and GC root. This distinguishes it from aggregate siblings like mat_histogram or mat_dominator, though it does not explicitly name those alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It implies the tool is for inspecting one object when an object id is available, but it does not explicitly state when to use this tool versus siblings such as mat_path2gc, mat_histogram, or mat_dominator. There are no stated exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_oqlB
Run an OQL query against the heap (slow!). Returns rows + a reusable resultSetId. Examples: "SELECT * FROM com.example.Foo s", "SELECT s.id.toString() FROM java.lang.String s". OQL can read arbitrary strings from the heap; handle results as private data. / 执行 OQL 查询(较慢)。返回行和可复用的 resultSetId。示例:SELECT * FROM com.example.Foo s。OQL 可读取堆内任意字符串,注意隐私。
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | ||
| sort | No | shallow | |
| view | No | list | |
| limit | No | ||
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does well: it discloses the performance cost, the reusable resultSetId, and the security-relevant fact that OQL can read arbitrary heap strings (treat results as private). It stops short of stating read-only semantics, timeout behavior, or how limit interacts with execution cost.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The lead sentence is well front-loaded with the operation and the 'slow' warning. However, the entire content is repeated verbatim in Chinese, roughly doubling length without adding information for most readers.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values are covered, and the description covers purpose, cost, and privacy. For a 5-parameter query tool with zero schema descriptions and no annotations, the missing explanation of limit/sort/view and of report_id binding leaves real gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% — parameters are bare titles only. The description gives concrete query-string examples for 'q', which is genuinely useful, but says nothing about report_id, sort, view, or limit, leaving four of five parameters undocumented anywhere.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Run an OQL query against the heap') and adds the key outputs (rows + resultSetId). It is clearly distinct from siblings like mat_histogram or mat_dominator, though it never explicitly contrasts itself with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The parenthetical '(slow!)' implicitly steers agents toward cheaper prebuilt tools when possible, and the privacy warning implies care. But there is no explicit when-to-use / when-not-to-use statement or named alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_overviewA
Show heap overview (used/committed/live heap, object/class/classloader counts, JDK version, leak suspect count). Always call this first to understand a heapdump. / 展示堆总览(已用/已提交/存活堆、对象/类/类加载器数量、JDK 版本、泄漏嫌疑数量)。分析 heapdump 时先调用本工具。
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden; 'Show' does imply a non-destructive read of an existing heapdump, which the agent can infer. However, it never states the prerequisite that a heapdump must already be opened (report_id from open_heapdump) or what happens on an invalid/closed report — material gaps for a tool positioned as the mandatory first step.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose statement is front-loaded and dense with useful specifics, and the ordering rule follows immediately. The only waste is the full bilingual repetition, which doubles length without adding information for a single reader.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described, yet the description still summarizes them, plus it establishes the call-first convention. What is missing is the lifecycle context: that it operates on a heapdump opened via open_heapdump and requires a valid report identifier.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the single parameter report_id is never mentioned in the description — not its meaning, nor where to obtain it (presumably from open_heapdump). With no schema text to fall back on, the description should have explained this identifier, so it fails to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb 'Show' plus the resource 'heap overview', followed by an explicit enumeration of contents (used/committed/live heap, object/class/classloader counts, JDK version, leak suspect count). This makes it clearly distinguishable from siblings like mat_histogram, mat_dominator, and mat_leak_suspects, which cover subsets of these facts.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Always call this first to understand a heapdump' gives an explicit ordering rule relative to every sibling, which is strong actionable guidance. It stops short of naming exclusions or follow-up paths (e.g., 'then use mat_leak_suspects for suspect detail'), so it is clear context without full alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_path2gcPath to GC rootsARead-onlyIdempotent
Read-only, synchronous lookup of the shortest reference chains from one object to GC roots, explaining why that object is still reachable and not collected. Returns up to five linear paths plus MAT's path tree. Typical flow: get an object id from mat_object, mat_histogram, mat_dominator, or a mat_leak_suspects preferredObjectId, confirm it with mat_object, then call this tool. Use mat_dominator instead when you want to know which object retains an entire subtree; use mat_leak_suspects when you do not yet have a specific object. Requires the report_id of a parsed dump (status=DONE).
| Name | Required | Description | Default |
|---|---|---|---|
| object | Yes | MAT object id as a decimal integer, copied from the objectId / preferredObjectId field of mat_object, mat_histogram, mat_dominator, or mat_leak_suspects. This endpoint does not accept 0x-prefixed hex. | |
| report_id | Yes | Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE). | |
| excludeWeakSoft | No | true (default) ignores paths through weak, soft, and phantom references, so only strong references that actually pin the object are shown. false includes reference types the GC may clear. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly/idempotent/closed-world, but the description adds real behavioral context: synchronous execution, the prerequisite that the dump be parsed (status=DONE), and the result shape (up to five linear paths plus MAT's path tree). It doesn't discuss cost/latency on very large heaps, which keeps it short of a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded and dense with no filler sentences, but it is a single packed paragraph where the upstream-flow sentence partially repeats ids of tools already listed in the alternative sentence; slightly trimming would improve scanability.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema, full param coverage, and safety annotations already present, the description covers exactly what structure can't: prerequisite state, upstream source of the identifier, and sibling routing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the object/report_id/excludeWeakSoft semantics are already fully documented, including the no-hex-id constraint and the weak/soft reference behavior. The description only restates where object ids come from, adding little beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a concrete verb and resource ("shortest reference chains from one object to GC roots") plus the intent (explain why the object is still reachable), which an agent can distinguish from mat_dominator or mat_leak_suspects without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit upstream flow (obtain an id from mat_object/mat_histogram/mat_dominator/mat_leak_suspects, confirm with mat_object, then call this) and names two alternatives with the conditions that select them (mat_dominator for subtree retention, mat_leak_suspects when no specific object exists).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_sql_in_threadsSQL in thread stacksARead-onlyIdempotent
Read-only scan of thread stacks for JDBC PreparedStatement objects and SQL strings, used to spot long-running or heavy queries held by threads at OOM time. Requires the report_id of a parsed dump (status=DONE). Results are sorted risky-first, then by the owning thread's retained heap, and include threadId, threadName, threadRetainedBytes, frame, source, objectId, sql, risk (risky|harmless|unknown), and reason. With onlyRisky=true, heartbeat/validation statements such as SELECT 1, SELECT 'x', /* ping */ and VALUES(1) are filtered out; pass onlyRisky=false to see all SQL-like strings.
| Name | Required | Description | Default |
|---|---|---|---|
| onlyRisky | No | true (default) drops harmless heartbeat/validation SQL (SELECT 1, SELECT 'x', /* ping */, VALUES(1)); false returns every SQL-like string found. | |
| report_id | Yes | Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnly, idempotent, closed-world), and the description adds genuinely new behavior: results are sorted risky-first then by retained heap, and heartbeat/validation statements are filtered by default. It omits anything about result size limits, pagination, or truncation on large dumps, which for a scan tool is a 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the purpose and prerequisite in the first two sentences, then the filtering semantics. The enumeration of every returned field is wasted space given an output schema exists, but the rest is dense and earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the return-value restatement is redundant, and prerequisites, default filtering, and sort order are all covered. Missing only operational details such as how many rows come back or behavior on a huge dump.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so baseline is 3. The description's explanation of onlyRisky and its example statements largely restates the parameter's own schema description rather than adding new semantics; report_id's prerequisite is the only real added value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Read-only scan of thread stacks for JDBC PreparedStatement objects and SQL strings') with a concrete investigative goal (heavy queries held by threads at OOM time). This clearly distinguishes it from siblings like mat_threadlocals (thread-local contents) and mat_oql (arbitrary queries).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives a clear triggering context ('spot long-running or heavy queries held by threads at OOM time') and a hard prerequisite (report_id of a parsed dump with status=DONE). It does not explicitly name alternative tools or say when to prefer e.g. mat_oql, so it stops short of full alternative routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_threadlocalsB
Inspect thread locals grouped by valueClass (default) or thread. Useful for finding thread-local leaks. / 按 valueClass(默认)或 thread 分组查看 ThreadLocal,常用于发现 ThreadLocal 泄漏。
| Name | Required | Description | Default |
|---|---|---|---|
| groupBy | No | valueClass | |
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It discloses the default grouping by valueClass and the alternative grouping by thread, but it omits whether the operation is read-only, any report prerequisites, permission needs, or other side-effect details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded, with the grouping behavior and leak-finding use stated immediately. The bilingual repetition adds length without adding new information for an English-reading agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is simple and has an output schema, so return details are not required. Still, with no annotations and 0% schema coverage, the description should explain the required report_id and any prerequisite about opening a report, which it does not.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for both parameters. It explains groupBy values and default well, but it never explains the required report_id parameter, its expected format, or where it comes from.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, 'Inspect', and a specific resource, 'thread locals', and states the grouping options. It is clearly about ThreadLocal inspection, though it does not explicitly distinguish itself from siblings such as mat_threads.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear usage context: 'Useful for finding thread-local leaks.' However, it does not state when not to use it or name alternative sibling tools for related diagnostics.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_threadsA
List threads (name/state/daemon/frameCount), or drill into a thread's stack frames (pass thread=id) or frame locals (pass frame=idx). / 列出线程(名/状态/daemon/帧数),或下钻到某线程的栈帧(传 thread=id)、某帧的局部变量(再传 frame=idx)。
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | ||
| thread | No | ||
| report_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral load. It does disclose the return shape of list mode and the hierarchical drill-down order (threads → frames → locals), which is valuable, but says nothing about cost (MAT report parsing is expensive), prerequisites (report must be loaded/open), or whether repeated calls across reports are expected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence that moves from the default listing to progressive drill-down, so the common case is stated first. The full bilingual duplication doubles the length without adding information, which keeps it from a 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, and mode selection is covered. However, it omits that report_id refers to a previously opened heap dump managed by siblings (open_heapdump/list_heapdumps), which is the main thing an agent could get wrong before calling.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does for two of three parameters: it clarifies thread is an id string and frame is an index, and that frame is only meaningful together with thread. report_id is left to the schema's title alone, which is a minor but real gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('List threads') and enumerates the fields returned (name/state/daemon/frameCount), plus the two drill-down modes. It does not name the closely related siblings (mat_threadlocals, mat_sql_in_threads, mat_object), so the agent must infer differentiation from mode semantics alone.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is made conditional in a usable way: pass thread=id to get stack frames, then additionally pass frame=idx to get frame locals. That is a clear when-to-use signal for each mode, but there is no guidance on when to prefer mat_threadlocals or mat_sql_in_threads, and no exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mat_top_consumersTop memory consumersARead-onlyIdempotent
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).
| Name | Required | Description | Default |
|---|---|---|---|
| report_id | Yes | Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
open_heapdumpA
Open a local Java heap dump (.hprof) by absolute path. Starts MAT indexing in the background and returns a report_id immediately with status=PARSING. Poll get_heapdump_status until DONE. / 按绝对路径打开本地 Java 堆转储(.hprof)。后台启动 MAT 解析并立即返回 report_id 与 status=PARSING,用 get_heapdump_status 轮询直到 DONE。
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the behavioral burden and does well: it discloses that MAT indexing runs in the background, that the call returns immediately with status=PARSING, and that completion must be polled. It omits error behavior for a missing/invalid path and any resource-lifecycle hint (close_heapdump), which keeps it from a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The English text is two tight, front-loaded sentences with the follow-up instruction last, so nothing is wasted. The full Chinese mirror doubles the length without adding information, which is defensible for a bilingual audience but is redundant text by strict conciseness standards.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return details needn't be explained, and the async contract plus polling instruction covers the non-obvious part of a one-parameter tool. What remains missing is failure handling and the related lifecycle step (closing the opened dump via close_heapdump).
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the single 'path' property has only a title, so the description must compensate. It adds two meaningful constraints absent from the schema: the path must be absolute and must point to a local .hprof file, which is exactly the information an agent needs to form a valid argument.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (open a local Java heap dump), names the accepted format (.hprof), and distinguishes itself from the listing/parsing siblings by being the entry point that produces a report_id. An agent can tell it apart from get_heapdump_status or list_heapdumps without opening any schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly describes the follow-up workflow: poll get_heapdump_status until DONE, which tells the agent exactly what to do after the call. It doesn't state when not to use this tool (e.g., when a dump is already open or when dump_java_heap should be used first), so it stops short of full routing guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.1- Changed
mat_path2gc3 fields changed- added
Input schema / properties / excludeWeakSoft / descriptionAdded value: +"true (default) ignores paths through weak, soft, and phantom references, so only strong references that actually pin the object are shown. false includes reference types the GC may clear." - added
Input schema / properties / object / descriptionAdded value: +"MAT object id as a decimal integer, copied from the objectId / preferredObjectId field of mat_object, mat_histogram, mat_dominator, or mat_leak_suspects. This endpoint does not accept 0x-prefixed hex." - added
Input schema / properties / report_id / descriptionAdded value: +"Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE)."
- Changed
mat_sql_in_threads2 fields changed- added
Input schema / properties / onlyRisky / descriptionAdded value: +"true (default) drops harmless heartbeat/validation SQL (SELECT 1, SELECT 'x', /* ping */, VALUES(1)); false returns every SQL-like string found." - added
Input schema / properties / report_id / descriptionAdded value: +"Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE)."
- Changed
mat_top_consumers1 field changed- added
Input schema / properties / report_id / descriptionAdded value: +"Report ID returned by open_heapdump or dump_java_heap; the dump must have finished parsing (status must be DONE)."
19 tool updates
v0.1.0- First observed
close_heapdump - First observed
dump_java_heap - First observed
get_heapdump_status - First observed
list_heapdumps - First observed
list_java_processes - First observed
mat_connection_pools - First observed
mat_diagnose_oom - First observed
mat_dominator - First observed
mat_histogram - First observed
mat_leak_suspects - First observed
mat_object - First observed
mat_oql - First observed
mat_overview - First observed
mat_path2gc - First observed
mat_sql_in_threads - First observed
mat_threadlocals - First observed
mat_threads - First observed
mat_top_consumers - First observed
open_heapdump
TDQS
Scored across 19 tools
Each tool targets a distinct analysis artifact (histogram, dominator tree, top consumers, threads, thread locals, GC paths, OQL, connection pools), and descriptions explicitly cross-reference when to prefer a sibling tool (e.g. mat_histogram vs mat_top_consumers vs mat_dominator, mat_path2gc vs mat_dominator). Composite tools like mat_diagnose_oom are clearly framed as aggregations rather than duplicates.
There is a readable two-tier convention: lifecycle tools use plain verb_noun (open_heapdump, get_heapdump_status, list_heapdumps, close_heapdump, dump_java_heap), and analysis tools are uniformly mat_-prefixed. Minor deviations like mat_threadlocals and mat_path2gc (digit abbreviation) break the pattern slightly.
Nineteen tools is on the heavy side of the ideal range, but heap-dump analysis genuinely has many distinct report types plus a lifecycle group (open/status/list/close/live dump/process discovery). Little appears redundant, though a couple of composite tools (mat_diagnose_oom) could arguably be derived from primitives.
The surface covers the full lifecycle (discover processes, capture live dumps, open, poll status, list, close) and a broad analysis set (overview, histogram, dominator, top consumers, threads, thread locals, object inspection, GC paths, leak suspects, connection pools, SQL-in-threads, OQL). No obvious dead ends for typical OOM/leak investigations.
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
MCP server to assist with JxBrowser development.
Analytics and debugging for your MCP server — explore usage and sessions, then root-cause errors.
Related MCP Servers
- AlicenseDqualityCmaintenanceMCP server that provides 8 tools for Java memory leak investigation: \- Class histograms, GC pressure snapshots, JFR recordings, heap dumps, MAT leak suspects analysis, async-profiler allocation profiles \- Structured confidence-based verdicts (none/low/medium/high) requiring independent signal corroboration \- Designed for use inside Claude Code with two slash commands84Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for profiling Java applications via JDK utilities (jcmd, jfr, jps). Enables AI assistants to diagnose performance, analyze threads, and inspect JFR recordings without manual CLI usage.26124 npm10MIT
- AlicenseNot gradedqualityAmaintenanceA Model Context Protocol (MCP) server for exploring, analyzing, and decompiling Java JAR files.221 npm7MIT
- AlicenseAqualityDmaintenanceMCP server that reads Spark profiler files to give accurate Minecraft server tuning advice, parsing binary protobuf directly and diagnosing TPS, MSPT, GC, heap, and call-tree issues.1429 npm7MIT