# Interactive Widgets

> Review asset searches, pick templates or assets, upload files, and approve pages from panels that render directly in the chat

Canonical URL: https://0.0.0.0:3005/tools/interactive-widgets

Some tools return a panel alongside their normal result. On hosts that support
MCP Apps, an asset search shows its terms and matches, template and asset
selectors render visual galleries, and asset upload opens a local file picker.

Nothing needs configuring. On hosts without inline UI support the same tools
return JSON, and the agent follows the equivalent text-only workflow.

## The five panels

| Panel | Appears when the agent calls | What you do |
|-------|------------------------------|-------------|
| **Template gallery** | `lexsis_template_library` actions `search_sections` or `search_page_kits` | Browse thumbnails of matching sections or full-page kits, pick one |
| **Asset search** | `lexsis_asset_library` action `search` | Review the search terms, filters, result count, and read-only previews |
| **Asset picker** | `lexsis_asset_select` action `select` | Multi-select existing library assets, then confirm with **Use selected** |
| **Asset upload** | `lexsis_asset_upload` action `upload` | Drop or choose a file from your own machine |
| **Page preview** | `lexsis_page_create` action `create` | Open the generated draft, then **Approve** or **Request changes** with notes |

## Search does not wait

The asset search panel is evidence for the agent. It shows what was searched,
which filters were applied, how many matches were found, whether more results
exist, and read-only asset previews. It has no selection controls.

The agent continues after reading a search result. If you should make the
choice, it calls `lexsis_asset_select` separately with action `select`.

## Picking is two steps

In the template or asset picker, clicking a card only selects it. Click it
again to deselect. The grid stays live so you can compare before committing.
Nothing reaches the agent until you press the confirm button.

This matters because your choice arrives as a normal chat message. Once sent, the agent acts on it, so the panel locks to avoid sending a contradiction.

## What the agent receives

Your selection comes back as an ordinary user message:

```text
Selected template: hero-clinical-supplements (Clinical Supplements Hero) — use this one.
```

```text
Use these images:

Product shots
1. serum-marble.png
   URL: https://pcx-assets.trylexsis.com/…/serum-marble.png
   Asset ID: 48c6d1d0-…
```

```text
Uploaded asset — use this:
- 9f2c1a7e-… (brand-logo.webp) https://pcx-assets.trylexsis.com/…/brand-logo.webp
```

The agent waits for that message rather than choosing for you. If you'd rather it just picked, say so — it will read the same results and continue.

## Uploading your own image

Ask the agent for an upload picker, or ask it to call
`lexsis_asset_upload` with action `upload`. Either way you get
a drop zone.

Large photos are compressed before they leave your browser — a 5 MB phone photo typically arrives as a 20 KB WebP, so uploads are quick and pages stay fast. A few formats are handled differently:

- **SVG** is passed through untouched, since it's already small and vector. Shown as a format chip rather than a thumbnail.
- **Animated GIF** is passed through unmodified so the animation survives.
- **Anything too large** is refused before upload, with the file's size and the limit both named, so you can pick a smaller file instead of waiting for a failure.

Re-uploading an image you've already added returns the existing asset instead of creating a duplicate.

## If no panel appears

Your host doesn't support inline UI. Nothing is broken: search still returns
its normal JSON evidence, and selectors return the same candidates for a
text-only choice. You can steer the agent in words: *"use the second one"* or
*"use this image URL instead"*. For local uploads, provide a URL or
conversation attachment so the agent can use `lexsis_asset_import`.

## Related

- [Asset Generation & Management](/tools/assets) — asset search, generation, and import contracts
- [Section & Page Templates](/tools/templates) — what the gallery is searching
- [Page Management](/tools/page-management) — publishing and previewing
