Authoring decks over MCP
What an AI agent can actually do with slide decks over the ShareMyPage MCP, and the recommended tool-calling workflow.
There is no separate deck-building API for agents, the MCP tools listed here
are the whole surface. Together they work like a UI: list_layouts and
get_layout are the component picker, get_slide and update_slide are the
editor, screenshot_page is the preview pane. This page walks through that
surface as a workflow, in the order you'd normally reach for it. For the
design rules the guides describe (type scale, tokens, spacing, layout
catalog), see Designing decks; for the exact input
schema of every tool, see the MCP tool reference.
1. Create the presentation
create_presentation seeds a new deck from a theme's starter layouts, a
cover, a content slide, and a closing slide, and returns the deck id, its
shareable /s/ URL, the layout ids it was seeded with, and a next hint
pointing at the next step. Omit theme and it uses the workspace's own
brand theme when it has one (asking which, if there are several), otherwise
the built-in sharemypage theme.
2. Get briefed before writing any slide HTML
Before hand-authoring or editing a slide's markup, call one of:
get_design_guide, guided mode: the theme's type scale, color tokens, spacing rhythm, layout catalog, and the do/don't checklist the in-app AI editor itself is briefed with. Accepts a builtin or custom theme id.get_developer_guide, freeform mode: how to hand-author a slide's full HTML and its own scoped CSS so it matches a customer's brand, custom fonts, colors, textures, bespoke sections, while still rendering inside the presentation engine. Reach for this instead of, or alongside,get_design_guidewhen the deck needs to look like the customer's own brand rather than the theme's.
Alongside the guide, list_layouts returns every layout's id, name, and a
one-line description for the resolved theme, and get_layout returns one
blueprint's complete HTML, ready to pass straight to add_slide or adapt.
3. Build slides
add_slideadds a slide to the deck. Provide eitherhtml(a complete<section class="slide">…</section>fragment) orlayout(a blueprint id fromlist_layouts), and optionallyafterSlide(a slideId or 1-based index) to place it, or omit it to append at the end. It runs a non-blocking lint over the new slide's HTML and reports any warnings, for example a class the theme doesn't define, which would render unstyled.update_slidereplaces a slide's HTML outright.patch_slidemakes a targeted find/replace edit to one slide without resending the whole fragment,findmust match the slide's current HTML exactly (by default once; passexpectedMatchesto change several identical spans at once). For a slide with embedded images, preferpatch_slideoverupdate_slideso you aren't resending the whole asset blob just to change some text.move_slide,duplicate_slide, anddelete_slidereorder, copy, or remove a slide by slideId or 1-based index (delete_sliderefuses to remove a deck's last slide).
4. Read slides safely, and edit concurrently without clobbering
get_slide returns one slide's HTML, title, and currentVersionId. Pass
that value back to update_slide as expectedVersionId: if the slide
changed since you read it (another edit landed in between), the write is
refused and you're told to re-fetch, reconcile, and try again, rather than
silently overwriting someone else's change. Omit expectedVersionId for
last-write-wins.
get_slide also elides large embedded base64 assets (a pasted logo or
screenshot) into a short placeholder token by default, with a manifest of
what was stripped, so reading an asset-heavy slide doesn't cost tokens just
to see its text. Pass assets: "inline" to get the raw HTML back if you
actually need it.
5. Check your work visually
screenshot_page renders a page's or presentation's current content in a
real headless browser and returns an image, so you can visually check
layout, overflow, and broken images instead of only inspecting the HTML. For
a presentation it shows the first slide by default; pass slide (a slideId
or 1-based index from list_slides) to render a different slide instead,
full-bleed, exactly as the live viewer would show it active.
Use this before calling a deck done
Rendering takes a few seconds because it launches a real browser per call, but it's the only way to actually see whether a hand-authored slide's CSS does what you intended, especially for freeform slides with their own custom rules.
6. Add images
add_image uploads an image and returns a URL to reference in a slide.
Decks keep images by URL, never inline base64. Provide either url (a
public http(s) image fetched server-side) or dataBase64 plus
contentType, up to 4 MB, PNG, JPEG, GIF, WebP, or SVG. Drop the returned
URL into an <img src="…"> via add_slide, update_slide, or
patch_slide.
7. Brand it with a theme
list_themeslists every theme available to the workspace, builtin and custom, with each one'skindand whether itcanBeBasefor a new custom theme.create_themecreates a workspace-scoped custom theme: a builtin base theme (its layouts, CSS, and engine) with your own brand tokens substituted in. Aprimaryaccent token is required; canvas tokens (canvas,ink,inkMuted,panel,line) re-skin the whole component system at once for a more brand-specific look (dark, forest, warm-paper, and so on);brandCssappends plain CSS for texture or label styling;fontUrlloads an extra brand font;logoLightUrl/logoDarkUrlset the theme's own logo lockup. Pass the returned theme id ascreate_presentation'sthemeargument.
An alternative entry point: importing a PowerPoint
Instead of building a deck slide by slide, an existing .pptx file can be
imported as a native deck, in two tool calls:
request_presentation_upload_urlreturns a short-lived URL toPUTthe raw.pptxbytes to directly (so any file size works) plus a token.import_uploaded_presentationtakes that token and builds the deck.
The importer reads the file's text, tables, and images straight from the
file, nothing is invented, matches them to the target theme's layouts, and
hosts images automatically. Two modes control how: reauthor (the default)
has the model lay out the real content into the theme's layouts, grounded in
the file so it can't fabricate facts; faithful is a plain, deterministic
1:1 reproduction with no model involved. A slide the importer can't
reproduce faithfully, a dense logo wall, a custom diagram, a very dense
table, is deferred: kept as a placeholder with a suggested fix rather than
faked. Omit theme here too and it resolves the same way as
create_presentation, the workspace's own brand theme first.
See also
- Designing decks for the type scale, tokens, spacing, layout catalog, and do/don't rules these tools are meant to produce.
- Slide decks for a plainer walkthrough of what a deck is.
- MCP tool reference for the complete deck, slide, and theme tool list.