tosea_edit_slide_page
Edit or add slides in presentations using text instructions and optional visual references to modify content or layout.
Instructions
Modify or insert a slide. Supports optional screenshot grounding for multimodal edits.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| presentation_id | Yes | ||
| page_number | Yes | ||
| action | Yes | ||
| instruction | Yes | ||
| edit_mode | No | outline_layout | |
| model_name | No | ||
| image_model | No | ||
| after_slide | No | ||
| screenshot_path | No | ||
| idempotency_key | No |
Implementation Reference
- src/tools.ts:243-290 (registration)Registration and handler implementation for "tosea_edit_slide_page" tool. The handler calls `client.editSlidePage` after preparing arguments and reading the screenshot if provided.
server.tool( "tosea_edit_slide_page", "Modify or insert a slide. Supports optional screenshot grounding for multimodal edits.", { presentation_id: z.string().uuid(), page_number: z.number().int().min(1), action: z.enum(["modify", "insert"]), instruction: z.string().min(1), edit_mode: z.enum(["outline_layout", "layout_only"]).default("outline_layout"), model_name: z.string().optional(), image_model: z.string().optional(), after_slide: z.number().int().min(1).optional(), screenshot_path: z.string().optional(), idempotency_key: z.string().min(8).optional() }, async ({ presentation_id, page_number, action, instruction, edit_mode, model_name, image_model, after_slide, screenshot_path, idempotency_key }) => { try { const screenshotBase64 = await maybeReadBase64File(screenshot_path); return asToolResult( await client.editSlidePage({ presentationId: presentation_id, pageNumber: page_number, action, instruction, editMode: edit_mode, modelName: model_name, imageModel: image_model, afterSlide: after_slide, screenshotBase64, idempotencyKey: idempotency_key }) ); } catch (error) { throw wrapToolError(error); } } );