Skip to main content
Glama

create_heap_dump

Captures a heap dump from a local JVM or a JVM inside a Docker container and loads it for analysis; includes per-object allocation data when recorded.

Instructions

Dump the heap of a locally running JVM or of a JVM inside a Docker container and load it for analysis. If allocation data is recorded for the JVM, the heap dump includes per-object allocation data. A recording session delivers a single heap dump, for a later dump attach again. You must call check_status to check the loading progress and - after this returns 'data_ready' - retrieve data with the query tool. You can use list_jvms to discover JVMs.

Input Schema

NameRequiredDescriptionDefault
pidNoThe PID of a local JVM process, or the container PID (NSpid) of a JVM inside the specified container. If a container is specified and this is omitted, the topmost JVM in the container is used.
containerNameOrIdNoThe name or ID of a Docker container. When specified, profiling attaches to a JVM inside this container.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv16.1.9
    • removedInput schema / $defs
      Removed value: -{}
    • removedInput schema / definitions
      Removed value: -{}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the load and does disclose key behavior: the operation is asynchronous (poll check_status until 'data_ready'), one dump per recording session, and allocation data is only included when recorded. It omits cost/size/time implications, failure modes (no JVM found, container not running), and whether the dump is persisted or discarded.

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

Conciseness4/5

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

Five compact sentences, front-loaded with the action and followed by the workflow. Each sentence carries information (state, sequencing, constraint), though the session/attach caveat could be tightened.

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

Completeness4/5

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

No output schema exists, but the description compensates by explaining that results are not returned directly and must be fetched via check_status plus the query tool. For a zero-required-param dump trigger this is nearly complete; only error/edge-case behavior is missing.

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 pid and containerNameOrId (including the NSpid and topmost-JVM fallback semantics) are already fully documented in the schema. The description adds only the hint that list_jvms can be used to discover JVM identifiers, which is marginal. Baseline 3 applies.

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 ('Dump the heap of a locally running JVM or of a JVM inside a Docker container') plus the post-condition ('load it for analysis'). It also routes to siblings (list_jvms, check_status, query), so an agent can distinguish it from attach/load_snapshot without opening schemas.

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

Usage Guidelines4/5

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

Gives explicit sequencing: call check_status, wait for 'data_ready', then retrieve with query; use list_jvms to discover JVMs. Also notes one heap dump per recording session and that a later dump requires attaching again. It never explicitly excludes the sibling attach/load_snapshot paths, which keeps it short of a 5.

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