Skip to main content
Glama

memory.usage

Read-only

Reports current JavaScript heap usage and DOM counters for a browser page or target, helping agents diagnose memory growth and DOM size.

Instructions

Current JS heap usage and DOM counters.

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

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

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds only a restatement of what is measured and says nothing about sampling cost, whether the reading is instantaneous or averaged, or whether it perturbs the page.

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?

A single tight phrase with no filler and the key noun front-loaded. It is a sentence fragment rather than a structured description, but nothing is wasted.

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 simple two-parameter read tool this is close to adequate, but with no output schema the agent is not told the shape of the returned heap fields or what DOM counters are reported, which matters if it needs to interpret results.

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 coverage is 100%, with both target_id and browser_id fully documented including the tgt_*/br_* handle formats and omission semantics. The description adds nothing beyond the schema, which is acceptable given the schema does the work.

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 names concrete measurements, "JS heap usage and DOM counters," so an agent knows it returns memory metrics rather than performing an action. It doesn't explicitly differentiate from near-siblings like storage.usage or memory.heap.compare, but the resource is specific enough to distinguish by name.

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus memory.heap.snapshot or memory.heap.compare, and no stated preconditions such as needing a live page target. The agent must infer usage entirely from the tool name.

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