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
textproperty 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
element_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 element_create to place one element at a time. For adding several elements at once, the assistant will typically use element_bulk_create (below) instead.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
slideId | string | Yes | The slide to add the element to |
elementType | enum | Yes | 'shape', 'text', or 'line' |
shapeType | enum | Shapes only | 'rectangle', 'circle', or 'diamond'. Required when elementType is 'shape' |
x, y | number | Shape/Text | Position in pixels from the top-left corner of the canvas |
width, height | number | Shape/Text | Dimensions in pixels |
role | enum | No* | '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 createdposition—{ x, y }in pixelssize—{ width, height }in pixelsoverflow— if the text doesn't fit, includes overflow info with suggestions for fixing it
Example — Shape with Text
element_create({
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
element_create({
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
element_create({
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
element_create({
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. element_bulk_create 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
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
slideId | string | No* | Single slide to add elements to. Mutually exclusive with slideIds |
slideIds | string[] | No* | Multiple slides (up to 20). The same elements are created on each slide. Mutually exclusive with slideId |
elements | array | Yes | Array of elements to create (1–50). Each element uses the same properties as element_create |
* 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
overflowinfo if text doesn't fit
Example — Build a Slide Layout
element_bulk_create({
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
element_bulk_create({
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 slidesUpdating Elements
When you ask to “change the title color to white” or “make the body text bigger,” your assistant uses element_bulk_update 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
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
updates | array | Yes | Array 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:
| Property | Type | Description |
|---|---|---|
x, y, width, height | number | Position and size in pixels |
rotation | number | Rotation in degrees |
opacity | number | 0–100 (fully transparent to fully opaque) |
zIndex | number | Layer order (higher values appear on top) |
fillColor, strokeColor | string | Colors as hex (e.g., '#1C2833') |
strokeWidth | number | Stroke width in pixels. Centered on the shape edge — doesn't affect text area |
strokeStyle | enum | 'solid', 'dashed', or 'dotted' |
text | string | Text content (supports **bold**, *italic*, - bullets, 1. numbered) |
fontSize, fontFamily, textColor | various | Font size in points, font family name, text color as hex |
textAlign, verticalAlign | enum | 'left'/ 'center'/ 'right' and 'top'/ 'middle'/ 'bottom' |
textInsets | object | Padding inside the element: { left, top, right, bottom } in pixels |
lineSpacing, paragraphSpacing | number / object | Line spacing multiplier (default 1.0) and paragraph spacing: { before, after } in points |
role | enum | null | Set or clear the semantic role. Pass null to remove |
altText | string | Alt text for image elements |
crop | object | Image 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), andoverflowinfo if applicable
Example
element_bulk_update({
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 element_delete to permanently remove an element from a slide. This cannot be undone, so your assistant will typically inspect the slide first with slide_get to find the right element ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
deckId | string | Yes | The deck ID |
elementId | string | Yes | The element to delete |
What It Returns
success— whether the deletion succeededelementId,type,slideId— confirmation of what was removed
Example
element_delete({
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
| Property | Type | Applies To | Description |
|---|---|---|---|
x, y | number | Shape, Text | Position in pixels from top-left |
width, height | number | Shape, Text | Dimensions in pixels |
rotation | number | All | Rotation in degrees |
opacity | number | All | 0–100 (default 100) |
Shape Styling
| Property | Type | Description |
|---|---|---|
fillColor | string | Fill color (hex) |
strokeColor | string | Stroke color (hex) |
strokeWidth | number | Stroke width in pixels. Centered on the shape edge — doesn't affect text area or content layout |
strokeStyle | enum | 'solid', 'dashed', or 'dotted' |
Text Formatting
| Property | Type | Description |
|---|---|---|
text | string | Text content. Supports markdown: **bold**, *italic*, - bullets, 1. numbered |
fontSize | number | Font size in points (e.g., 12 for body, 24 for headings, 36+ for titles) |
fontFamily | string | Font family name. Use util_list_fonts to discover available fonts |
textColor | string | Text color (hex) |
textAlign | enum | 'left', 'center', or 'right' |
verticalAlign | enum | 'top', 'middle', or 'bottom' |
textInsets | object | Padding: { left, top, right, bottom } in pixels (defaults: 9.6px horizontal, 4.8px vertical) |
lineSpacing | number | Line spacing multiplier (default 1.0 = single spacing) |
paragraphSpacing | object | { before, after } in points (default: 0) |
role | enum | Semantic role: 'title' (36–44pt), 'subtitle' (18–24pt), 'body' (14–18pt), 'footer' (10–12pt) |
Line Properties
| Property | Type | Description |
|---|---|---|
startX, startY | number | Start point in pixels (use instead of startAnchor) |
endX, endY | number | End point in pixels (use instead of endAnchor) |
startAnchor, endAnchor | object | Connect to an existing element: { type, elementId, connectionPointId } |
arrowHead | boolean | Show arrow at the end point |
arrowTail | boolean | Show 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” →
element_createorelement_bulk_createto add one or more elements - “Build a slide with a title bar, accent line, and bullets” →
element_bulk_createto create all elements in one step - “Add a footer to every slide” →
element_bulk_createwithslideIdsto replicate across slides - “Change the title color to white” →
element_bulk_updateto modify the existing title element - “Remove the subtitle” →
element_deleteto 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