capture_component
Serialize any page component into a portable rebuild pack with structure, computed-style tokens, animations, typography usage, and color palette summaries.
Instructions
Serialize a page component (structure, computed-style tokens, animations) into a portable pack for rebuild tooling. Adds typography usage summaries (families/sizes/weights/line-heights/letter-spacings, top 12 each + sampled node count) and paletteSummary (colour counts from node styles + pack colors, transparent/rgba(0,0,0,0)/none filtered, top 24). compact=true returns a token-diet summary and omits both. Runs on any URL — does not fetch awwwards.com.
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": "capture_component"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute page URL whose component to serialize | |
| compact | No | token-diet summary: node styles/text/svg/anims and the typography/paletteSummary blocks are dropped; the {tag, classes, rect} tree, fonts and colors stay | |
| maxDepth | No | Max serialized tree depth (0 = unlimited; omit for unlimited). Values above 12 risk Code Mode's 32-level response cap; 12 keeps a capped pack safe. `depthCapped:true` means deeper nodes were omitted. | |
| maxNodes | No | Max DOM nodes to serialize (default 400, clamp 50-2000) | |
| selector | No | CSS selector of the component root (default 'header') | |
| viewport | No | desktop = 1440x900 (default); mobile = 390x844 iPhone-class with deviceScaleFactor 3, isMobile + hasTouch | desktop |
| publicOnly | No | Refuse private/loopback/metadata destinations and route the browser through the pinned public-address guard |