pptx_add_slide
Append a new slide to an existing PowerPoint file. Set layout by index and optionally populate the title placeholder.
Instructions
Append a new slide to the deck.
The slide is always appended to the end
(VAL-PPTX-018 — the returned index equals the previous
slide count). When title is given, the slide's title
placeholder is populated (VAL-PPTX-021).
Args:
path: Path to an existing .pptx.
layout_index: 0-based index into prs.slide_layouts. The
default 1 is the "Title and Content" layout in
python-pptx's default template.
title: Optional title text. When None the title
placeholder is left empty.
folder: Optional base folder for relative paths.
Returns:
{"index": <int>} — the 0-based index of the new slide.
Raises:
OfficeMCPError: ERR_INVALID_PARAMS for a non-int or
out-of-range layout_index (the deck is not
modified in this case — VAL-PPTX-020),
ERR_FILE_NOT_FOUND if the file is missing,
ERR_UNSUPPORTED_FMT for non-.pptx extensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| layout_index | No | ||
| title | No | ||
| folder | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||