# `T3.HTML`
[🔗](https://github.com/dl-alexandre/t3-elixir/blob/main/lib/t3/html.ex#L1)

HTML MCP operations. Pass T3's original string-keyed argument maps.

Tool availability depends on the authenticated server, permission mode and
invocation context. In-app agent tools may not be available to outside clients.
See `T3.Catalog.tools(:html)` for descriptions and context requirements.

# `preview`

```elixir
@spec preview(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

Check an HTML page before html_render. Returns PNG, contentHeight, and console output. If it says the browser is still installing, call again in a minute. Inline <style> and <script>. Local images as absolute paths are inlined. Remote URLs load as-is. Theme and layout rules are in html_render.

Requires a compatible T3 agent/thread context and runtime; not generally exposed to outside OAuth clients.

# `render`

```elixir
@spec render(T3.Client.t(), map()) :: {:ok, map()} | {:error, T3.Error.t()}
```

Show a finished HTML page (chart, diagram, mockup) inline in this thread, above your final reply. Do not announce or restate the page. Frame fits height to 20000px. On mobile, content past the given height scrolls. Frame width is reply width (728px desktop, about 360px phones), on the thread background. Leave html, body, and the outer element with no background color, no outer card, border, banner title, or side padding. This wins over any rule that sets a page background. T3 adds an overridable 8px html gutter for selection rings and shadows. Use fluid widths within it. A box that needs its own background gets 16px padding and var(--radius) corners. Give charts fixed pixel heights. Let content set the height. Do not use vh units or height:100% on html or body. Both are rejected or loop. Use theme CSS variables on :root, not fixed colors: --background, --foreground, --muted, --card, --popover, --secondary, --border, --ring, --primary, --accent, --destructive, --warning, --success, --info, --code-background (most have a matching -foreground; accent, destructive, and warning also have -surface), --chart-1 to --chart-6, --radius, --font-sans, --font-mono. The base sheet sets background, text, and font.

Requires a compatible T3 agent/thread context and runtime; not generally exposed to outside OAuth clients.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
