# Slides

The 23 tools for slides. Before an agent first makes one, it reads guide topic slides.

## create_slides

Add a slide deck to a space: a real PowerPoint-style presentation (layouts, themes, text, shapes, pictures, tables, charts, speaker notes, transitions) that people edit and present in Artifacts and download as .pptx or PDF. Start it as one title slide, from an outline (markdown: each `# heading` starts a slide with that title, `- items` under it are its bullets, indented two spaces per level), or from a file (.pptx, by public URL or base64). Then shape it with the slides_* tools and check it with render_slides. Read guide topic "slides" first.

Parameters:
- `space_id` (string, required)
- `title` (string, required)
- `outline` (string): Markdown outline: "# Title of slide 1\n- point\n  - sub-point\n# Title of slide 2\n…"
- `file` (object): Start from this presentation (up to 50 MB) instead of a title slide.

## read_slides

Read a deck as it is now, including people’s edits: every slide with its number (1-based), id, layout, title, hidden flag and speaker notes, and its shapes with their ids (what slides_set_text, slides_select and comment take), kinds, placeholder types, boxes [x, y, w, h] in points and text. Pass slides (numbers) to read only some.

Parameters:
- `item_id` (string, required)
- `slides` (integer[])

## slides_list_commands

Every command (id, label, ribbon/menu place, shortcut, parameter summary, whether it is enabled now). Filter by a substring of id or label. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide).

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `filter` (string): Substring of the id or label, e.g. `format.` or `slide`

## slides_run_command

Run any command by id with JSON parameters. This is how everything is done: slide.new, shape.insert, text.set, format.bold, shape.fill, design.theme, transition.set, animation.add, table.merge, edit.undo… Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `command` (string, required): Command id from slides_list_commands
- `params` (object): Parameters (see the command's params summary)

## slides_batch

Run commands in order; stops at the first error unless keepGoing. Returns each result. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `commands` (object[], required)
- `keepGoing` (boolean): Continue after errors

## slides_inspect_document

Slides (index, id, title, layout, shape count, transition, animations, notes), sections, theme, layouts, media and the selection. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide).

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)

## slides_inspect_slide

One slide's shapes with ids, kinds, boxes [x,y,w,h], placeholder types, text, fills, tables, charts; plus background, transition, animations, notes. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide).

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `index` (integer): Slide index (default: current)

## slides_add_slide

Insert a slide after the current one with a layout (title, titleAndContent, sectionHeader, twoContent, comparison, titleOnly, blank, contentWithCaption, pictureWithCaption) and optional title/body text (body: one paragraph per line, leading tabs indent). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `body` (string): Body text
- `layout` (string): Layout name or kind
- `title` (string): Title text

## slides_go_to_slide

Make a slide current (shape commands act on the current slide). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `index` (integer, required): Slide index

## slides_add_shape

Insert a preset shape (rect, roundRect, ellipse, triangle, diamond, rightArrow, chevron, star5, heart, cloud, wedgeRectCallout, line, straightConnector1… see shape.presets) at x,y with size w×h, with optional text and fill colour (#RRGGBB or accent1..6). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `fill` (string): Fill colour
- `h` (number, required): Height (pt)
- `line` (string): Outline colour or `none`
- `preset` (string, required): Preset name
- `text` (string): Text inside
- `w` (number, required): Width (pt)
- `x` (number, required): Left (pt)
- `y` (number, required): Top (pt)

## slides_add_text_box

Insert a text box. Height grows to fit the text. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `align` (string): left|center|right|justify
- `color` (string): Text colour
- `h` (number): Height (pt)
- `size` (number): Font size (pt)
- `text` (string, required): Text (one paragraph per line)
- `w` (number, required): Width (pt)
- `x` (number, required): Left (pt)
- `y` (number, required): Top (pt)

## slides_set_text

Replace a shape's text (keeps its first run's formatting). Leading tabs set bullet levels. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `id` (integer, required): Shape id (from slides_inspect_slide)
- `text` (string, required): New text

## slides_insert_picture

Insert a picture from a file path or base64 data, optionally at a box. Give the picture as url (a public address; Artifacts downloads it) or data (base64) with name; path is not available. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `data` (string): Base64 image data (instead of path)
- `h` (number): Height
- `name` (string): File name for data
- `path` (string): Image file path
- `w` (number): Width
- `x` (number): Left
- `y` (number): Top
- `url` (string): A public http(s) address of the picture

## slides_insert_table

Insert a table with rows×cols and optional cell text (data: rows of strings). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `cols` (integer, required): Columns
- `data` (string[][])
- `h` (number): Height
- `rows` (integer, required): Rows
- `w` (number): Width
- `x` (number): Left
- `y` (number): Top

## slides_insert_chart

Insert a chart (column, bar, line, pie, doughnut, area, scatter, stackedColumn…) with categories and series. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `categories` (string[])
- `series` (object[])
- `title` (string): Chart title
- `type` (string): Chart type

## slides_select

Select shapes by id (formatting commands then act on them). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `ids` (integer[], required)

## slides_pointer

Drive the active tool with pointer events in slide points: down/drag/up/move/doubleclick/contextclick, exactly like the mouse (draws, moves, resizes, rotates, places the caret; contextclick selects like a right click). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `events` (object[], required)
- `mods` (object): Modifier keys (cmd = Command on macOS / Ctrl elsewhere; alt = Option)

## slides_select_tool

Pick the pointer tool: select, textBox, shape (with preset), pen, highlighter, eraser — or a preset name. Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `preset` (string): Shape preset for the shape tool
- `tool` (string, required): Tool name

## slides_key

Press a key as on the keyboard: text editing keys (arrows, Backspace, Enter, Tab), nudges, and shortcuts (cmd+B…). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `key` (string, required): Key name or character
- `mods` (object): Modifier keys (cmd = Command on macOS / Ctrl elsewhere; alt = Option)

## slides_type_text

Type text into the text being edited (or into the selected shape). Acts on the deck item_id: slide indexes here are 0-based (slide 1 is index 0); a call naming a shape (id, ids) works on that shape's slide, and new shapes, tables, charts and pictures go on the current slide (slides_go_to_slide). Everyone with the deck open sees the change at once.

Parameters:
- `item_id` (string, required): The slide deck (from create_slides or get_space)
- `text` (string, required): Text

## slides_undo

Take back your own latest change to the deck (one tool call); call again for the one before. Only while nobody has changed the deck since: it never takes back a person's or another agent's work. Everyone with the deck open sees it go back.

Parameters:
- `item_id` (string, required)

## render_slides

See slides as the audience does (DeckCraft draws them, as in the slide show), with problems per slide: text running out of its box, shapes off the slide, placeholders left empty (they show nothing in the show), slides with nothing on them, slides without a title, pictures without alternative text, text too faint against its background. Pass slides (numbers) to render only some; default all, up to 12 per call. Run it after every change you make and fix what it finds.

Parameters:
- `item_id` (string, required)
- `slides` (integer[])

## export_slides

Links to download the deck as a PowerPoint file (.pptx) or a PDF (one page per slide). Fetch them with your Artifacts key (Authorization: Bearer).

Parameters:
- `item_id` (string, required)
