#Deck tools
Whole-deck operations: create, read, update, list, replace all slides, list slide summaries, and export. Use these when the unit of work is the entire presentation.
decks.listdeck.getdeck.createdeck.updatedeck.replaceAllSlidesdeck.listSlidesdeck.export
#Slide tools
Slide-level operations cover everything from a one-element style change to a full-deck batched rewrite. slide.edit accepts revision-guarded patches against text, attributes, styles, ordering, and root-level HTML insertion. slides.batchUpdate creates, replaces, updates, or deletes multiple slides in a single call.
slide.getslide.duplicateslide.moveslide.replaceslide.editslides.batchUpdate
#Preview and selection
Preview closes the loop: agents render a slide as PNG or JPEG before deciding whether the change worked. selection.get reads the user's current highlight in the editor — useful when you ask for help with "this slide" from inside the canvas.
slide.previewselection.get
#Assets
asset.upload puts an image into deck storage and returns an asset:// reference. The same tool with scope: "brand" uploads reusable brand assets like logos and wordmarks. Brand assets persist across decks; deck assets are scoped to one deck.
asset.upload
#Brand
The brand kit travels into every generated deck. brand.context returns the markdown brand brief, color palette, and asset metadata (logo, wordmark, custom uploads). brand.update writes those back. Agents call brand.context before drafting so the first draft already lands on-brand.
brand.contextbrand.update
#Versions
Variant keeps a server-side version history. Agents list saved versions and restore one as the current revision when an edit goes wrong — no manual undo in the editor required.
deck.versions.listdeck.version.restore
#Slide source format
Slide content is HTML in the content field. CSS lives in inline styles or style blocks. JavaScript belongs in runtime.script with interactivity set to scripts; raw script tags inside content are sanitized.
Built-in runtime libraries cover Chart.js, D3, GSAP, and Three.js, so agents can produce charts, motion, and 3D scenes without bundling. Tailwind utility classes work without a build step — when class attributes are present, the Tailwind browser runtime is injected automatically.
#Revision conflicts
Write tools accept an optional expectedRevision. If the deck has changed since the agent last read it, the tool fails with STALE_REVISION rather than silently overwriting. The error includes the current deck revision and per-slide revisions, so the client can refresh, rebase, and retry.
Other recoverable errors include INVALID_TOOL_ARGUMENTS (Zod validation), DECK_NOT_FOUND, SLIDE_NOT_FOUND, ASSET_NOT_FOUND, BRAND_ASSET_NOT_FOUND, STALE_BRAND_REVISION, DECK_TRASHED, UNAUTHORIZED, FORBIDDEN, and RATE_LIMITED.
{
"code": "STALE_REVISION",
"data": {
"toolName": "slide.edit",
"deckId": "dk_7xm2p",
"currentDeckRevision": 42,
"currentSlideRevisions": [
{ "slideNumber": 1, "revision": 11 },
{ "slideNumber": 2, "revision": 7 }
]
}
}#Tool responses
Every tool returns a short text summary plus a structured JSON payload. Write tools return compact deck or slide summaries instead of full slide HTML — call slide.get when the agent needs full source content. That keeps the agent's working context small even on long-running tasks.
#Schemas
Full input and response JSON Schemas live in the @variant/mcp-contract package. The same schemas come back from an MCP client's tools/list call, so agents can introspect tool shapes without leaving the protocol.
Scopes
| Scope | What it allows |
|---|---|
| deck:read | List and read decks and slides. |
| deck:write | Create and update decks, edit slides, upload assets, and write brand settings. |
| slide:replace | Replace whole slide content. |
| slide:preview | Render slide previews. |
| export:run | Trigger deck exports. |
| authenticated | Read brand context — no extra scope required. |
#Common questions
How many MCP tools does Variant expose?
20 tools across decks, slides, previews, selection, assets, brand, versions, and exports. Each tool requires the minimum scope it needs, and full schemas are available from the MCP tools/list call.
Can an agent edit one element on a slide?
Yes. slide.edit targets text, attributes, styles, ordering, and other element-level changes, and it can apply slide-level updates for content, interactivity mode, and runtime script settings.
Can an agent preview a slide?
Yes. slide.preview renders a PNG or JPEG so the agent can inspect layout before deciding whether the change worked.
What happens when two agents edit the same deck?
Write tools accept an expectedRevision. If the deck has changed underneath, the tool fails with a recoverable STALE_REVISION error that includes the current deck and slide revisions. The client refreshes, rebases its plan, and retries.
Where are the full tool schemas?
In the @variant/mcp-contract package, and in the JSON Schemas returned by an MCP client's tools/list call.