Skip to main content
Glama

Memory Metrics

memory_metrics

Profiles page memory by returning JS heap size, DOM node count, and layout metrics so you can diagnose leaks, slow pages, or decide whether to reuse a tab.

Instructions

Performance counters: JS heap size, DOM nodes, layout count, etc.

When: profiling a slow page, hunting a memory leak across a long automation run, or deciding whether to close a tab vs reuse it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tab_id": "<tab_id>"
    },
    "name": "memory_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
force_refreshNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies a read-only diagnostic call and hints at cost by suggesting it is used during profiling, but it does not say whether metrics collection perturbs the page, whether force_refresh triggers a GC, or what permissions/state the tab must be in.

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?

Two tight sentences with the what and when front-loaded. The trailing 'etc.' is mildly vague but does not undermine the otherwise efficient structure.

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?

An output schema exists, so return values needn't be explained. However, with zero annotation coverage and zero schema descriptions, the definition is missing basic operational context — especially what force_refresh does and whether the call is expensive or side-effect-free.

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 description coverage is 0% for two parameters, so the description must compensate — and it does not mention either tab_id or force_refresh. The meaning and effect of force_refresh, in particular, is completely undocumented in both structured and unstructured fields.

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 a concrete resource — performance counters — and enumerates what they include (JS heap size, DOM nodes, layout count). That is enough for an agent to understand what the tool returns, though it does not explicitly differentiate itself from adjacent diagnostic siblings such as get_console_logs or get_network_requests.

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?

The 'When:' clause gives three concrete scenarios: profiling a slow page, hunting a memory leak over long runs, and deciding between closing versus reusing a tab. That is clear contextual guidance, although no explicit exclusions or named alternative tools are provided.

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