Skip to main content
Glama

skeleton.capture

Measure a page’s real UI at several widths and save a skeleton file of exact boxes for loading placeholders, so placeholders match the layout across breakpoints.

Instructions

Measure the real UI at several widths and save a skeleton (bones) file: the exact boxes a loading placeholder should draw. Elements carrying the marker attribute (default data-skeleton) are used when present; otherwise the layout under selector is decomposed automatically - wrapped text into one bone per visual line, media and controls into their own boxes, and any container that paints a background or a rounded border into a lighter surface bone drawn underneath its children. Circles, pills and asymmetric corners are preserved as such. Bones are matched across widths by DOM position, so an element that only exists on desktop is recorded as absent on mobile rather than shifting the rest. Viewport emulation is always cleared afterwards.

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": {
      "name": "<name>"
    },
    "name": "skeleton.capture"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoNavigate here first. Omit to measure the current page.
nameYesName to save the skeleton under; also its filename.
heightNoViewport height for every width. Default 900.
markerNoAttribute marking elements to measure. Default "data-skeleton".
mobileNoEmulate a mobile device as well as the width. Off by default: on a page without a <meta name="viewport"> it forces a 980px layout viewport, so the media queries evaluate at the wrong width and the capture describes the desktop layout.
widthsNoCSS widths to capture. Default [375, 768, 1280].
replaceNoDiscard widths from an earlier capture of this name instead of merging them. By default re-capturing at one width keeps the others.
min_sizeNoIgnore boxes smaller than this in CSS px. Default 1, which keeps hairline dividers.
selectorNoRoot to measure. Default body. Narrow this to skeleton one component.
leaf_tagsNoExtra tags to capture as a bone when they have no children. Added to p, h1-h6, li, td, th.
max_bonesNoCap on bones per capture. Default 400.
max_linesNoCap on line bones per text run. Default 12.
save_pathNoAlso write the .bones.json here.
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
containersNoEmit a lighter surface bone for containers that paint a background, image or rounded border, drawn underneath their children so a card reads as a card. Default true.
exclude_tagsNoTags to skip entirely, with their whole subtree, e.g. ["nav","footer"].
include_bonesNoReturn every bone inline. Off by default: the summary is usually enough.
default_radiusNoCorner radius in px for bones whose element has none. Default 8.
exclude_selectorsNoCSS selectors to skip entirely, with their subtrees, e.g. [".icon","[data-no-skeleton]"]. An invalid selector is ignored rather than failing the capture.
device_scale_factorNo
capture_rounded_bordersNoTreat a rounded element with a visible border as a surface even when its background is white or transparent. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations are thin (readOnlyHint=false, openWorldHint=true), so the description carries most of the burden and does it well: it discloses that viewport emulation is always cleared afterwards, that bones are matched across widths by DOM position so desktop-only elements register as absent rather than shifting others, and that re-capture merges widths unless `replace` is set. It does not say where the skeleton lands by default or what the summary response contains, which is the remaining gap.

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?

Front-loaded with the outcome (what is measured and saved), then the decomposition rules, then edge-case behavior; no filler sentences. It is a dense single block, though, and could be split so the caveats about cross-width matching and viewport cleanup are easier to scan.

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

Completeness4/5

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

For a 22-parameter, open-world capture tool with no output schema, the description covers the core mechanics, the auto-vs-marker decision, and a critical side effect (viewport emulation cleanup). It stops short of describing the default save location and what the default (non-`include_bones`) response looks like, which leaves a small gap for an agent deciding whether to set `include_bones`.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 95%, but the description still adds real meaning beyond the field docs: it explains what the marker attribute means when present, how the selector subtree is decomposed (wrapped text into one bone per visual line, media/controls into own boxes, container surfaces underneath children), and that circle/pill/asymmetric corner shapes are preserved — which gives sense to `containers`, `capture_rounded_borders`, and `leaf_tags` rather than just restating them.

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?

States a specific verb (measure), a specific object (the real UI at several widths) and a concrete artifact (a skeleton/bones file of the exact boxes a loading placeholder should draw). That framing makes it clearly distinct from siblings like skeleton.preview, skeleton.show, or skeleton.emit without needing to open any schema.

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 explains the two operating modes (explicit marker elements vs. automatic decomposition under `selector`) and the schema note 'Narrow this to skeleton one component' hints at scoping, but it never says when to call this versus siblings such as skeleton.preview, skeleton.show, or skeleton.emit. Usage is implied by the workflow rather than stated.

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