Skip to main content
Glama

memory.gc

Force garbage collection before a snapshot so only genuinely retained objects appear, helping distinguish real memory usage from collectable data.

Instructions

Force a garbage collection, so a following snapshot only shows genuinely retained objects.

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.gc"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and openWorldHint=true, which signals mutation but not what kind. The description adds real behavioral context: the operation alters future observations by removing collectable objects before a snapshot. It does not disclose whether the call blocks, how expensive it is, or which heap/scope is collected.

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?

One sentence, front-loaded with the action and followed by the reason. There is no filler, and the action/benefit ordering makes the tool's purpose immediately scannable.

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-optional-parameter tool with a fully documented schema and no output schema, the description covers the action and its effect adequately. The only gap is operational characteristics (cost, blocking behavior, scope of collection), which a careful agent might want 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% – both target_id and browser_id are fully documented in the schema, including the 'omit for active page' and auto-launch defaults. The description adds no parameter meaning beyond that, 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?

States a specific verb and resource: 'Force a garbage collection,' and ties it to an observable purpose ('so a following snapshot only shows genuinely retained objects'). That framing implicitly distinguishes it from memory.heap.snapshot without naming the sibling explicitly.

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 a clear usage context: run this before taking a snapshot if you want retained objects rather than collectable garbage. It stops short of when-not-to-use guidance or naming an alternative tool for heap inspection (e.g., memory.heap.compare), so it is not a full 5.

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