Skip to main content
Glama

trace_element

Trace the complete lifecycle of a DOM element—from creation, mounting, mutations, and style changes to removal—to diagnose when and why UI elements disappear or change.

Instructions

Trace the entire chronological lifecycle of a DOM element from creation, mounting, mutations, style changes to unmounting/removal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoLogicalNodeId of the element
selectorNoCSS selector hint for the element
sessionIdYesSession ID

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It explains the scope of the trace (creation, mounting, mutations, style changes, removal) and implies a read-only operation, but it does not disclose what the tool returns, whether a recorded session is required, how data is ordered, or any limitations. This is partially transparent but leaves key behavioral aspects unspecified.

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?

The description is a single, tightly written sentence. It front-loads the verb and resource and packs the lifecycle scope into a compact list without unnecessary words. Every part earns its place.

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?

The description covers the core purpose but leaves gaps: no output schema and no mention of return format, ordering, or prerequisites. Given the complexity of tracing a lifecycle and the absence of annotations, an agent would benefit from knowing whether historical recording is required, how the result is presented, and whether it works for live elements. This is adequate but not complete.

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%, so the schema documents nodeId, selector, and sessionId well. The description does not add parameter-level meaning beyond the schema, and the mention of lifecycle milestones doesn't clarify which parameter combination is sufficient (e.g., nodeId vs selector). Baseline 3 is appropriate because the schema handles parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Trace') and a specific resource ('DOM element') and scopes the behavior to the entire chronological lifecycle—creation, mounting, mutations, style changes, unmounting/removal. This is much more precise than sibling tools like get_dom_state or get_dom_node and clearly distinguishes what this tool covers.

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 description implies the use case (need lifecycle history of an element), but it does not explicitly state when to use this over alternatives like get_events, get_timeline, or why_did_element_disappear. No exclusions or alternative routing are provided, so an agent must infer the appropriate context from the description alone.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IrMaho/Mcp-DOM'

If you have feedback or need assistance with the MCP directory API, please join our Discord server