Skip to main content
Glama

take_heapsnapshot

Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.

Instructions

Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.

Input Schema

NameRequiredDescriptionDefault
pageIdYesTargets a specific page by ID.
filePathYesA path to a .heapsnapshot file to save the heapsnapshot to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • changedInput schema / additionalProperties
      Previous value: -{}New value: +false
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The annotations declare only readOnlyHint=false, leaving the description to explain why this counts as a write. It never states that a file is written to disk at filePath, that the snapshot can be large or slow, or whether the page is paused. It does add purpose context (memory-leak debugging) that the annotations do not provide.

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?

Two sentences, front-loaded with what the tool does followed by when to use it. Every phrase carries information and nothing is padded.

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?

For a two-parameter, no-output-schema tool, the description covers the action and purpose adequately; the output destination is clear from the required filePath. Minor gaps remain around side effects (disk write, snapshot size) that an agent would benefit from knowing before invoking.

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 both pageId and filePath are already fully documented in the schema. The description adds no format, path convention, or overwrite behavior beyond what the schema states, so the baseline of 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource ('Capture a heap snapshot of the target page'), which is clearly distinct from takeover siblings like take_screenshot or take_snapshot. It does not explicitly say how it differs from take_snapshot, but the memory/heap framing does the differentiating work.

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

Usage Guidelines3/5

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

'Use to analyze the memory distribution of JavaScript objects and debug memory leaks' gives a use case, so the intent is implied rather than absent. There is no guidance on when to prefer this over alternatives such as performance_start_trace or performance_analyze_insight, and no exclusion conditions.

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