Skip to main content
Glama

capture_ui_reference

Normalize HTML/JSX/Vue/Svelte markup, inline styles, CSS rules, and Tailwind utility classes into a structured UiReferenceSnapshot with pseudo-state hooks.

Instructions

Normalize HTML/JSX/Vue/Svelte markup, inline styles, CSS rules, and Tailwind utility classes into a structured UiReferenceSnapshot with pseudo-state hooks.

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": {
      "markup": "<markup>"
    },
    "name": "capture_ui_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoOptional stylesheet or CSS rules
markupYesHTML, JSX, Vue, or Svelte markup snippet
componentNameNo
sourceFrameworkHintNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, yet it discloses almost nothing behavioral: it does not say whether the snapshot is persisted or returned only, whether 'pseudo-state hooks' means hover/focus/active selectors are captured, how unsupported or malformed markup is handled, or whether the operation has side effects. Naming the output artifact is the only added context.

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 dense sentence with the input set front-loaded and the output artifact trailing, with no filler. It is efficient, though the enumeration of formats crowds out more useful behavioral detail.

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?

For a 4-parameter capture tool with no annotations and no output schema, the definition covers the input surface and names the return type, which is a reasonable minimum. It still leaves the shape of UiReferenceSnapshot and the meaning of 'pseudo-state hooks' unexplained, which matters because no output schema documents the return value.

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?

With only 50% schema description coverage, the description should compensate, but it merely echoes the markup/css inputs. It never explains what 'componentName' is used for (naming the snapshot? scoping selectors?) or how 'sourceFrameworkHint' changes parsing versus auto-detection.

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?

Uses a specific verb ('Normalize') on a concrete set of inputs (HTML/JSX/Vue/Svelte markup, inline styles, CSS rules, Tailwind classes) and names the artifact produced (UiReferenceSnapshot with pseudo-state hooks). That makes it distinguishable from extraction/decomposition siblings, but it never explicitly contrasts itself with them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to call this versus extract_design_tokens, decompose_layout_skeleton, or audit_ui_fidelity, nor any prerequisites or exclusions. The agent must infer the selection criteria from the sibling names alone.

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