Slide Operations
Your AI assistant uses these tools to work with individual slides — adding new ones, inspecting what's on them, making copies, and removing slides you don't need.
A slide is a single page in a presentation. Each slide has a background color and contains elements like text, shapes, lines, and images. When you ask your assistant to modify specific slides, it uses these tools behind the scenes. For creating multiple slides at once, it uses slides_bulk_create instead.
Adding a Slide
When you ask for a new slide in a specific position (“add a blank slide after slide 2”), your assistant uses slides_add_slide. It creates a single slide with an optional layout and returns the placeholder elements created by that layout (title, body, etc.), which can then be styled or filled with content.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The ID of the slide deck |
layoutId | string | No | 'builtin-blank', 'builtin-title-slide', 'builtin-title-and-content', or a template layout ID |
afterSlideNumber | number | No | Insert after this slide number (1-based). Use 0 for the beginning. Omit to add at the end. |
backgroundColor | string | No | Slide background color (hex, e.g., '#FFFFFF'). Overrides layout default. |
What It Returns
slideId— the new slide's IDlayoutName— name of the layout appliedelements— placeholder elements created by the layout (with elementId, type, and role)canvas—{ width, height }in pixels
Example
slides_add_slide({
deckId: "deck_abc123",
layoutId: "builtin-title-and-content",
afterSlideNumber: 2,
backgroundColor: "#1C2833"
})
// Response:
// {
// slideId: "slide_xyz789",
// slideIndex: 2,
// layoutName: "Title and Content",
// elements: [
// { elementId: "elem_001", type: "text", role: "title" },
// { elementId: "elem_002", type: "text", role: "body" }
// ],
// canvas: { width: 1280, height: 720 }
// }Inspecting Slide Contents
When your assistant needs to see what's on specific slides before making changes, it calls slides_get_slides. This returns every element on the requested slides — text content, positions, sizes, colors, fonts, images, and more. It's a read-only operation that supports up to 20 slides per request.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The ID of the slide deck |
slideIds | string[] | No* | Array of slide IDs to retrieve |
slideNumbers | number[] | No* | Array of slide numbers (1-based) to retrieve |
* At least one of slideIds or slideNumbers must be provided. You can provide both to combine results.
What It Returns
For every element on the requested slides, the response includes:
- Position and size — x, y coordinates and width, height in pixels
- Text content — the actual text and formatting (fontSize, color, fontFamily, alignment)
- Shape styling — fill color, stroke color/width/style, shape type
- Role — semantic role (title, subtitle, body, footer) if assigned
- Image details — URL, dimensions, and alt text for image elements
- Line properties — start/end anchors and arrow heads/tails for line elements
Example
// Get slides by number (1-based)
slides_get_slides({
deckId: "deck_abc123",
slideNumbers: [1, 2]
})
// Response includes full element details:
//
// ## 2 Slide(s) Retrieved
//
// ### Slide 1 (`slide_001`)
// Layout: Title Slide | Background: #1C2833 | 3 elements
//
// 1. `elem_a` text [title]
// Position: (80, 200) | Size: 1120 × 100
// Text: "Q4 Business Review"
// Style: 44pt #FFFFFF Inter center
//
// 2. `elem_b` text [subtitle]
// Position: (80, 320) | Size: 1120 × 60
// Text: "January 2026"
// Style: 24pt #AAB7B8 Inter center
//
// ### Slide 2 (`slide_002`)
// Layout: Title and Content | Background: #1C2833 | 2 elements
// ...// Or get slides by ID
slides_get_slides({
deckId: "deck_abc123",
slideIds: ["slide_001", "slide_003"]
})Duplicating a Slide
When you say “copy slide 3” or “make a variation of this slide,” your assistant uses slides_duplicate_slide. It creates a complete copy of the slide and all its elements at the specified position. The response includes a mapping of old element IDs to new ones, so the assistant can update specific elements in the copy without affecting the original.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The ID of the slide deck |
slideId | string | No* | The ID of the slide to duplicate |
slideNumber | number | No* | The slide number to duplicate (1-based) |
afterSlideNumber | number | No | Where to insert the copy: 0 = beginning, N = after slide N, -1 = end. Omit to insert right after the source slide. |
* At least one of slideId or slideNumber must be provided.
What It Returns
newSlideId— the duplicated slide's IDnewSlideNumber— position of the new slide (1-based)elementsCopied— number of elements duplicatedelementIdMap— mapping of old element IDs to new ones, so the assistant can update specific elements in the copytotalSlideCount— total slides in the deck after duplication
Example
slides_duplicate_slide({
deckId: "deck_abc123",
slideNumber: 1,
afterSlideNumber: -1 // -1 = end of deck
})
// Response:
// {
// newSlideId: "slide_new456",
// newSlideNumber: 9,
// sourceSlideNumber: 1,
// elementsCopied: 3,
// elementIdMap: [
// { oldElementId: "elem_a", newElementId: "elem_d", type: "text" },
// { oldElementId: "elem_b", newElementId: "elem_e", type: "text" },
// { oldElementId: "elem_c", newElementId: "elem_f", type: "shape" }
// ],
// totalSlideCount: 9
// }Deleting a Slide
When you ask to remove a slide, your assistant uses slides_delete_slide. This permanently deletes the slide and all its elements — this action cannot be undone. A well-behaved assistant will inspect the slide contents first (using slides_get_slides) to make sure it's deleting the right one.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The ID of the slide deck |
slideId | string | Yes | The ID of the slide to delete |
What It Returns
success— confirmation the slide was deleteddeletedElementCount— number of elements removed with the slideremainingSlideCount— total slides remaining in the deck
Example
slides_delete_slide({
deckId: "deck_abc123",
slideId: "slide_xyz789"
})
// Response:
// {
// success: true,
// slideId: "slide_xyz789",
// slideIndex: 2,
// deletedElementCount: 4,
// remainingSlideCount: 7
// }Slide Numbering
When you refer to “slide 3” in conversation, your assistant maps that to the right slide behind the scenes. Here's how numbering works:
slideNumber— always 1-based. Slide 1 is the first slide.afterSlideNumber— 1-based with special values:0= insert at the beginning,-1= insert at the end.
Tip: Slide IDs are more reliable than numbers
Slide numbers change when slides are added, reordered, or deleted. Slide IDs are stable — your assistant uses them when referencing specific slides across multiple operations.
Related
- Deck Operations — Create, find, and manage presentations (includes slides_bulk_create for multiple slides)
- Element Operations — Create and style shapes, text, lines, and images on slides
- Layouts — Built-in and template layouts available when adding slides
- Create a Presentation with AI — End-to-end guide for building slides with natural language