Skip to main content
Glama
webEmbedding

webEmbedding

by jongko54

trace_runtime_sources

Trace preview, embed, and scene URLs on a single page viewport using a browser runtime, with optional session-aware capture when Playwright is available.

Instructions

Use a browser runtime to trace preview, embed, and scene URLs for a single viewport, with optional session-aware capture when Playwright is available.

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": {
      "url": "<url>"
    },
    "name": "trace_runtime_sources"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic http(s) URL of the page to inspect, capture, or clone.
patternNoCase-insensitive regex for network/HTML URLs to report as embed or source hits (default spline|preview|embed|viewer|scene|iframe).
capture_htmlNoReturn the rendered runtime HTML.
wait_secondsNoUpper bound in seconds for each browser readiness wait (load, network quiet, lazy-load scroll); capture continues as soon as the page settles.
user_data_dirNoPath to an existing Chrome profile directory, to capture a page behind a login the user owns. Omit for a clean session.
viewport_widthNoPrimary browser viewport width in CSS pixels (default 1440).
viewport_heightNoPrimary browser viewport height in CSS pixels (default 1200).
capture_screenshotNoTake a full-page PNG screenshot (needed for visual verification).
storage_state_pathNoPath to a Playwright storage-state JSON (cookies, localStorage) to load before capture, for pages behind a login the user owns.
storage_state_output_pathNoPath to write the browser storage state after capture, so the session can be reused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.3.13
    • addedInput schema / properties / capture_html / description
      Added value: +"Return the rendered runtime HTML."
    • addedInput schema / properties / capture_screenshot / description
      Added value: +"Take a full-page PNG screenshot (needed for visual verification)."
    • addedInput schema / properties / pattern / description
      Added value: +"Case-insensitive regex for network/HTML URLs to report as embed or source hits (default spline|preview|embed|viewer|scene|iframe)."
    • addedInput schema / properties / storage_state_output_path / description
      Added value: +"Path to write the browser storage state after capture, so the session can be reused."
    • addedInput schema / properties / storage_state_path / description
      Added value: +"Path to a Playwright storage-state JSON (cookies, localStorage) to load before capture, for pages behind a login the user owns."
    • addedInput schema / properties / url / description
      Added value: +"Public http(s) URL of the page to inspect, capture, or clone."
    • addedInput schema / properties / user_data_dir / description
      Added value: +"Path to an existing Chrome profile directory, to capture a page behind a login the user owns. Omit for a clean session."
    • addedInput schema / properties / viewport_height / description
      Added value: +"Primary browser viewport height in CSS pixels (default 1200)."
    • addedInput schema / properties / viewport_width / description
      Added value: +"Primary browser viewport width in CSS pixels (default 1440)."
    • addedInput schema / properties / wait_seconds / description
      Added value: +"Upper bound in seconds for each browser readiness wait (load, network quiet, lazy-load scroll); capture continues as soon as the page settles."
  2. First observedv0.3.12

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare openWorldHint=true, idempotentHint=false and destructiveHint=false, so the agent knows this is a non-destructive but non-idempotent live-web operation. The description adds real value by flagging the Playwright dependency for session-aware capture and the one-viewport scope, but it says nothing about artifacts written to disk (screenshot, storage-state output) or how long a capture run may take. With annotations carrying the safety profile, a 3 fits.

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 sentence with no filler, front-loaded on the verb and resource, and the scope and conditional are tacked on efficiently. It is slightly dense -- 'trace preview, embed, and scene URLs' compresses several filter behaviors into a phrase -- but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a ten-parameter, open-world, file-writing tool with no output schema, yet the description never says what a 'trace' returns (URL hits list? HTML? screenshot?) or how artifacts get produced. The agent must reconstruct behavior from the schema alone and cannot tell when this should be preferred over inspect_url, discover_embed_candidates, or capture_reference_bundle.

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% across all ten parameters, including regex defaults, viewport bounds and profile/storage-state paths, so the schema does nearly all the work. The description adds only the 'single viewport' framing and the 'session-aware capture' framing, which gently explains why the login/profile parameters exist but adds no syntax or interaction detail beyond the schema.

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 pairs a specific verb ('trace') with specific resources ('preview, embed, and scene URLs') and scopes them to 'a single viewport', which tells an agent exactly what is being inspected. It never names a sibling such as inspect_url or discover_embed_candidates, so the boundary with those tools must be inferred rather than read.

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?

Usage is implied rather than stated: 'when Playwright is available' signals a capability precondition for session-aware capture, and 'for a single viewport' signals a scope limit. There is no explicit when-not guidance and no routing to alternatives like inspect_url or capture_reference_bundle.

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