Skip to main content
Glama

Clone Element

clone_element

Extracts a selected page element's DOM, CSS, asset URLs, and standalone renderable document for UI lifting, bug reproduction, or training data.

Instructions

Pixel-approx clone: DOM+CSS+asset URLs+renderable doc. ~80% fidelity. For UI lifting / bug repro / training pairs. Use when you need the RENDER not just text.

Ex: clone_element('t0', '.product-card') → {"_untrusted":true,"html":"...","css":"...","doc":"","assets":[...]}

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>",
      "selector": "<selector>"
    },
    "name": "clone_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
tab_idYes
selectorYes
max_doc_charsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does real work: ~80% fidelity is disclosed (approximate, not exact), the output is flagged `_untrusted`, and the returned fields are listed. It omits whether assets are fetched over the network, what happens when max_doc_chars is exceeded, and any tab-state prerequisites, leaving meaningful behavioral gaps for a capture tool.

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?

Extremely dense and front-loaded: capability, fidelity, use cases, selection criterion, then a concrete call/response example. Every clause earns its place, though the telegraphic phrasing ('Pixel-approx', 'UI lifting') assumes some familiarity.

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 output schema means return shape needs no prose, and the inline example is a bonus. But for a 3-parameter tool with zero annotation and zero schema-description coverage, the description should at minimum explain max_doc_chars and truncation, and note prerequisites like an open tab — those gaps keep it at minimum-viable-plus.

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 0%, so the description must compensate for all three parameters. The example reveals the tab_id format ('t0') and selector style ('.product-card'), but max_doc_chars — including its default, truncation behavior, and unit — is never explained anywhere, so compensation is only partial.

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+resource (clone an element) and enumerates exactly what the clone contains: DOM, CSS, asset URLs, and a renderable `doc`. It contrasts with text-extraction work ('need the RENDER not just text') but never names a concrete sibling such as inspect_element, dom_query, or screenshot, so differentiation stops at the generic level.

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 concrete use cases (UI lifting, bug repro, training pairs) and an explicit selection criterion ('Use when you need the RENDER not just text'), which implicitly routes plain-text needs to extract_text/dom_query. It stops short of naming those alternatives or stating when not to use it (e.g., huge pages, cross-origin styles).

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