Skip to main content
Glama

memory.heap.snapshot

Capture a labeled heap snapshot streamed to an artifact so you can compare memory states later and diagnose leaks or growth in Chromium pages.

Instructions

Take a heap snapshot, streamed straight to an artifact. Label it so you can diff two of them later.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memory.heap.snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelNo
save_pathNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
collect_garbageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the schema already signals this is a non-read, environment-touching operation. The description adds genuinely useful behavior beyond that: the snapshot is streamed to an artifact rather than returned inline. It omits cost/pause implications of snapshotting, whether an artifact path is required, and what collect_garbage does.

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, zero filler, with the primary action and the labeling rationale front-loaded. Nothing could be removed without losing information.

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

Completeness3/5

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

For a 5-parameter, mutation-flagged tool with no output schema, the description covers the headline action and the artifact output, which is the most important return-path fact. It leaves gaps around save_path vs. implicit artifact storage and the garbage-collection flag, so an agent still has to guess at part of the invocation surface.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 40% across 5 parameters. The description gives meaning to 'label' (used to diff snapshots later), but says nothing about save_path, collect_garbage, or the target_id/browser_id selection semantics beyond what the schema already states. Two parameters are effectively undocumented in both places.

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 ('Take a heap snapshot') plus the output destination ('streamed straight to an artifact'), which distinguishes it from read-only memory inspection tools. It does not explicitly name memory.heap.compare or inspector.snapshot, so sibling differentiation is only implicit via the diff remark.

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?

The phrase 'Label it so you can diff two of them later' implies the intended workflow (take one, take another, compare), which is useful context. However, there is no explicit when-to-use/when-not guidance, no mention of memory.heap.compare as the follow-up tool, and no note on when to prefer inspector.snapshot or page.snapshot instead.

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

Deploy Server

Other Tools