Skip to main content
Glama

take_heapsnapshot

Capture a heap snapshot of a target page to analyze JavaScript object memory distribution 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

TableJSON 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. 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 readOnlyHint=false annotation already signals this is not a pure read operation, and the filePath parameter conveys that output is written to disk. However, the description never mentions that it writes a .heapsnapshot file, whether it overwrites an existing path, or the cost/size implications of capturing a heap snapshot, so it adds little beyond the structured fields.

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 short sentences with zero waste, front-loading the action before the use case. Every sentence earns its place.

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 simple two-parameter tool with full schema coverage and no output schema, the description is nearly sufficient: it explains what is captured and why. The only gap is that it does not disclose the disk-write behavior that the missing-file semantics might matter for.

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%, with pageId and filePath both documented in the schema, so the baseline is 3. The description adds no further meaning about either parameter, such as pageId validity or .heapsnapshot file semantics.

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?

States a specific verb and resource: 'Capture a heap snapshot of the target page,' which tells an agent exactly what the tool produces. It does not explicitly distinguish itself from the similarly named sibling take_snapshot, which could cause selection ambiguity, so it stops short of a 5.

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?

It gives a rationale ('analyze the memory distribution of JavaScript objects and debug memory leaks') that implies when the tool is useful, but offers no explicit when-not conditions or named alternatives such as take_snapshot or performance_start_trace. Usage is inferable rather than stated.

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