set_slide
Add, replace, or insert slides in a presentation with precise positional control. Use expected_slide_count to prevent concurrent edit conflicts.
Instructions
Add, replace, or insert a slide.
insert=False (default): index < slide count -> replace in place; index >= slide count -> append. insert=True: inserts at index, shifting that slide and everything after it later (index >= slide count still appends). Combine with delete_slide to move a slide to a new position.
content is raw Pandoc Markdown -- also supports speaker notes by
name alone. Exact syntax for three Beamer-specific conventions:
Incremental bullets : > - item
Section divider : content is ONLY "# Section Title", nothing else
Two-column layout : :::: {.columns}\n::: {.column width="50%"}\nLeft\n:::\n::: {.column width="50%"}\nRight\n:::\n::::
expected_slide_count : optional. If a concurrent call already changed the deck since you last checked, this fails with a clear error instead of silently landing at an unintended position -- get_presentation to refresh, then retry. Recommended when issuing several set_slide calls for the same presentation without waiting for each result first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| title | Yes | ||
| insert | No | ||
| content | Yes | ||
| presentation_id | Yes | ||
| expected_slide_count | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||