Element Operations

Your AI assistant uses these tools to add, modify, and remove the shapes, text, and lines that make up each slide. You don't call them directly — just describe what you want and your assistant handles the rest.

Every slide is made of elements — the individual pieces of content your audience sees. There are four element types you can create:

  • Shape — rectangle, circle, or diamond. Shapes support text directly inside them — use the text property on a shape instead of layering a separate text element on top.
  • Text — a standalone text block for titles, body content, captions, or any text that doesn't need a background shape.
  • Line — a connector between two points, with optional arrow heads. Lines can anchor to other elements so they stay connected when elements move.
  • Chart — data visualizations (bar, line, pie, scatter, and more). Created via slides_create_chart.

Images and charts are added with separate tools — see Images and Charts. For design guidance on combining these elements, see Visual Design Techniques.

Creating a Single Element

When you ask to “add a title to this slide” or “put a blue rectangle behind the heading,” your assistant uses slides_create_element to place one element at a time. For adding several elements at once, the assistant will typically use slides_bulk_create_elements (below) instead.

Parameters

ParameterTypeRequiredDescription
deckIdstringYesThe deck ID
slideIdstringYesThe slide to add the element to
elementTypeenumYes'shape', 'text', or 'line'
shapeTypeenumShapes only'rectangle', 'circle', or 'diamond'. Required when elementType is 'shape'
x, ynumberShape/TextPosition in pixels from the top-left corner of the canvas
width, heightnumberShape/TextDimensions in pixels
roleenumNo*'title', 'subtitle', 'body', or 'footer'. Identifies the element's purpose on the slide

* Always set role on text elements with semantic meaning (titles, body, etc.). Decorative shapes like accent bars or background rectangles don't need a role. See the full list of styling properties in the Common Properties Reference below.

What It Returns

  • elementId — the new element's ID (use this for updates and line anchors)
  • type — the element type that was created
  • position { x, y } in pixels
  • size { width, height } in pixels
  • overflow — if the text doesn't fit, includes overflow info with suggestions for fixing it

Example — Shape with Text

slides_create_element({
  deckId: "deck_abc123",
  slideId: "slide_001",
  elementType: "shape",
  shapeType: "rectangle",
  x: 60, y: 40,
  width: 500, height: 80,
  fillColor: "#1C2833",
  text: "**Q4 Business Review**",
  fontSize: 36,
  fontFamily: "Inter",
  textColor: "#FFFFFF",
  textAlign: "left",
  verticalAlign: "middle",
  role: "title"
})

// Response:
// {
//   id: "j97x...",
//   elementId: "elem_abc123",
//   type: "shape",
//   slideId: "slide_001",
//   position: { x: 60, y: 40 },
//   size: { width: 500, height: 80 },
//   zIndex: 0
// }

Example — Text Element

slides_create_element({
  deckId: "deck_abc123",
  slideId: "slide_001",
  elementType: "text",
  x: 60, y: 150,
  width: 600, height: 300,
  text: "- Revenue up 18% QoQ\n- 340 new customers\n- Expanded to 3 new markets",
  fontSize: 16,
  fontFamily: "Inter",
  textColor: "#AAB7B8",
  role: "body"
})

Example — Line

// Line with an arrow from point A to point B
slides_create_element({
  deckId: "deck_abc123",
  slideId: "slide_001",
  elementType: "line",
  startX: 60, startY: 130,
  endX: 560, endY: 130,
  strokeColor: "#5EA8A7",
  strokeWidth: 3,
  arrowHead: false
})

// Anchored line — connects to an existing element
slides_create_element({
  deckId: "deck_abc123",
  slideId: "slide_001",
  elementType: "line",
  startAnchor: {
    type: "connected",
    elementId: "elem_abc",
    connectionPointId: "right"
  },
  endAnchor: {
    type: "connected",
    elementId: "elem_def",
    connectionPointId: "left"
  },
  strokeColor: "#2E4053",
  arrowHead: true
})

Creating Multiple Elements

Most of the time, your assistant builds a slide by placing several elements at once — a title, an accent bar, body text, and so on. slides_bulk_create_elements creates up to 50 elements in a single atomic call. All elements succeed or all fail — you won't end up with a half-built slide.

You can also target multiple slides at once using slideIds — the same elements are replicated on each slide. This is useful for adding consistent footers, logos, or accent bars across your entire presentation.

Parameters

ParameterTypeRequiredDescription
deckIdstringYesThe deck ID
slideIdstringNo*Single slide to add elements to. Mutually exclusive with slideIds
slideIdsstring[]No*Multiple slides (up to 20). The same elements are created on each slide. Mutually exclusive with slideId
elementsarrayYesArray of elements to create (1–50). Each element uses the same properties as slides_create_element

* Exactly one of slideId or slideIds must be provided.

What It Returns

  • slides — array of results grouped by slide, each containing the created elements with their IDs, types, positions, and sizes
  • Each element includes overflow info if text doesn't fit

Example — Build a Slide Layout

slides_bulk_create_elements({
  deckId: "deck_abc123",
  slideId: "slide_002",
  elements: [
    {
      elementType: "shape",
      shapeType: "rectangle",
      x: 0, y: 0,
      width: 12, height: 720,
      fillColor: "#5EA8A7"
    },
    {
      elementType: "text",
      x: 60, y: 40,
      width: 600, height: 60,
      text: "Revenue Highlights",
      fontSize: 40,
      fontFamily: "Inter",
      textColor: "#FFFFFF",
      role: "title"
    },
    {
      elementType: "line",
      startX: 60, startY: 110,
      endX: 400, endY: 110,
      strokeColor: "#5EA8A7",
      strokeWidth: 3
    },
    {
      elementType: "text",
      x: 60, y: 130,
      width: 600, height: 400,
      text: "- Total revenue: **$4.2M**\n- Growth: +18% QoQ\n- New customers: 340",
      fontSize: 16,
      fontFamily: "Inter",
      textColor: "#AAB7B8",
      role: "body"
    }
  ]
})

// Response:
// {
//   slides: [
//     {
//       slideId: "slide_002",
//       elements: [
//         { elementId: "elem_001", type: "shape", ... },
//         { elementId: "elem_002", type: "text", ... },
//         { elementId: "elem_003", type: "line", ... },
//         { elementId: "elem_004", type: "text", ... }
//       ]
//     }
//   ]
// }

Example — Add Footers Across Slides

// Add a footer to every slide at once
slides_bulk_create_elements({
  deckId: "deck_abc123",
  slideIds: ["slide_001", "slide_002", "slide_003"],
  elements: [
    {
      elementType: "text",
      x: 60, y: 680,
      width: 300, height: 24,
      text: "Confidential — Acme Corp",
      fontSize: 10,
      textColor: "#666666",
      role: "footer"
    }
  ]
})

// The same footer element is created on all 3 slides

Updating Elements

When you ask to “change the title color to white” or “make the body text bigger,” your assistant uses slides_bulk_update_elements to modify existing elements. Only the fields you provide are changed — everything else stays the same. You can update up to 50 elements across any slides in the deck in one atomic call.

Parameters

ParameterTypeRequiredDescription
deckIdstringYesThe deck ID
updatesarrayYesArray of updates (1–50). Each needs elementId plus at least one property to change

Updatable Properties

Each update object must include elementId and at least one of these properties:

PropertyTypeDescription
x, y, width, heightnumberPosition and size in pixels
rotationnumberRotation in degrees
opacitynumber0–100 (fully transparent to fully opaque)
zIndexnumberLayer order (higher values appear on top)
fillColor, strokeColorstringColors as hex (e.g., '#1C2833')
strokeWidthnumberStroke width in pixels. Centered on the shape edge — doesn't affect text area
strokeStyleenum'solid', 'dashed', or 'dotted'
textstringText content (supports **bold**, *italic*, - bullets, 1. numbered)
fontSize, fontFamily, textColorvariousFont size in points, font family name, text color as hex
textAlign, verticalAlignenum'left'/ 'center'/ 'right' and 'top'/ 'middle'/ 'bottom'
textInsetsobjectPadding inside the element: { left, top, right, bottom } in pixels
lineSpacing, paragraphSpacingnumber / objectLine spacing multiplier (default 1.0) and paragraph spacing: { before, after } in points
roleenum | nullSet or clear the semantic role. Pass null to remove
altTextstringAlt text for image elements
cropobjectImage crop: { left, top, right, bottom } as percentages (0–95)

What It Returns

  • results — array of results, one per updated element
  • Each result includes elementId, updatedFields (list of field names that changed), and overflow info if applicable

Example

slides_bulk_update_elements({
  deckId: "deck_abc123",
  updates: [
    {
      elementId: "elem_002",
      textColor: "#FFFFFF",
      fontSize: 44,
      fontFamily: "Playfair Display"
    },
    {
      elementId: "elem_004",
      text: "- Total revenue: **$5.1M**\n- Growth: +22% QoQ\n- New customers: 410",
      textColor: "#F4F6F6"
    },
    {
      elementId: "elem_001",
      fillColor: "#2E4053",
      width: 16
    }
  ]
})

// Response:
// {
//   results: [
//     { elementId: "elem_002",
//       updatedFields: ["textColor", "fontSize", "fontFamily"] },
//     { elementId: "elem_004",
//       updatedFields: ["text", "textColor"] },
//     { elementId: "elem_001",
//       updatedFields: ["fillColor", "width"] }
//   ]
// }

Deleting an Element

When you say “remove that subtitle” or “delete the divider line,” your assistant uses slides_delete_element to permanently remove an element from a slide. This cannot be undone, so your assistant will typically inspect the slide first with slides_get_slides to find the right element ID.

Parameters

ParameterTypeRequiredDescription
deckIdstringYesThe deck ID
elementIdstringYesThe element to delete

What It Returns

  • success — whether the deletion succeeded
  • elementId, type, slideId — confirmation of what was removed

Example

slides_delete_element({
  deckId: "deck_abc123",
  elementId: "elem_003"
})

// Response:
// {
//   success: true,
//   elementId: "elem_003",
//   type: "line",
//   slideId: "slide_002"
// }

Common Properties Reference

These properties can be set when creating or updating elements. Not all properties apply to all element types.

Position & Size

PropertyTypeApplies ToDescription
x, ynumberShape, TextPosition in pixels from top-left
width, heightnumberShape, TextDimensions in pixels
rotationnumberAllRotation in degrees
opacitynumberAll0–100 (default 100)

Shape Styling

PropertyTypeDescription
fillColorstringFill color (hex)
strokeColorstringStroke color (hex)
strokeWidthnumberStroke width in pixels. Centered on the shape edge — doesn't affect text area or content layout
strokeStyleenum'solid', 'dashed', or 'dotted'

Text Formatting

PropertyTypeDescription
textstringText content. Supports markdown: **bold**, *italic*, - bullets, 1. numbered
fontSizenumberFont size in points (e.g., 12 for body, 24 for headings, 36+ for titles)
fontFamilystringFont family name. Use slides_list_fonts to discover available fonts
textColorstringText color (hex)
textAlignenum'left', 'center', or 'right'
verticalAlignenum'top', 'middle', or 'bottom'
textInsetsobjectPadding: { left, top, right, bottom } in pixels (defaults: 9.6px horizontal, 4.8px vertical)
lineSpacingnumberLine spacing multiplier (default 1.0 = single spacing)
paragraphSpacingobject{ before, after } in points (default: 0)
roleenumSemantic role: 'title' (36–44pt), 'subtitle' (18–24pt), 'body' (14–18pt), 'footer' (10–12pt)

Line Properties

PropertyTypeDescription
startX, startYnumberStart point in pixels (use instead of startAnchor)
endX, endYnumberEnd point in pixels (use instead of endAnchor)
startAnchor, endAnchorobjectConnect to an existing element: { type, elementId, connectionPointId }
arrowHeadbooleanShow arrow at the end point
arrowTailbooleanShow arrow at the start point

Which Tool Will My Assistant Use?

Your AI assistant picks the right tool based on what you ask:

  • “Add a title to this slide” slides_create_element or slides_bulk_create_elements to add one or more elements
  • “Build a slide with a title bar, accent line, and bullets” slides_bulk_create_elements to create all elements in one step
  • “Add a footer to every slide” slides_bulk_create_elements with slideIds to replicate across slides
  • “Change the title color to white” slides_bulk_update_elements to modify the existing title element
  • “Remove the subtitle” slides_delete_element to permanently remove it

Related

  • Deck Operations — Create and manage presentations
  • Slide Operations — Add, inspect, duplicate, and delete individual slides
  • Images — Add images from URLs with automatic sizing
  • Styling — Colors, fonts, sizes, markdown formatting, and design techniques
  • Slide Rules & Roles — Element roles, visual hierarchy, and per-deck rules
  • Design Techniques — Color blocks, accent lines, split backgrounds, and more