set_slide_transition
Add slide transitions, click-to-reveal animations, or enter/leave motion effects to Slidev slides; preview changes with dry-run before writing slides.md.
Instructions
Add transitions, click animations (v-click), and motion effects (v-motion) to Slidev slides. Supports: slide transitions (per-slide or global), v-click step-by-step reveals, v-mark highlights, and v-motion enter/leave animations. Set dry_run=true to preview the slides.md diff without writing. Reference: https://sli.dev/guide/animations
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mode": "<mode>"
},
"name": "set_slide_transition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Animation mode: 'transition' — Set slide-to-slide transition for a specific slide. 'global-transition' — Set the default transition for ALL slides (global headmatter). 'v-click' — Add click-to-reveal animations to elements in a slide's content. 'v-motion' — Add enter/leave motion animations to elements in a slide. | |
| dry_run | No | Preview the change without writing slides.md. Returns dryRun, wouldWrite, and diff. | |
| auto_wrap | No | For 'v-click' mode without click_content: if true, automatically wraps each non-empty content block (paragraphs, headings after the first) in the slide with sequential v-click directives. Useful for step-by-step reveals. | |
| transition | No | Transition name. Built-ins: slide-left, slide-right, slide-up, slide-down, fade, fade-out, zoom, none. Can also be a custom CSS class name. For forward/backward different transitions, use 'forward|backward' format (e.g. 'slide-left|slide-right'). Required for modes 'transition' and 'global-transition'. | |
| click_count | No | For 'transition' mode: sets the number of clicks required before the slide advances. Maps to the 'clicks' frontmatter field. | |
| slide_number | No | Target slide number (1-based). Required for modes 'transition', 'v-click', and 'v-motion'. | |
| click_content | No | For 'v-click' mode: the slide's full new content with v-click/v-after/v-mark directives already embedded as HTML attributes. Example: '# Title\n\n<div v-click>Appears on click 1</div>\n\n<p v-click>Appears on click 2</p>\n\n<span v-mark.underline="3">Underlined on click 3</span>'. The tool replaces the slide content with this value. If omitted, the tool appends v-click wrappers to each paragraph/heading in the slide. | |
| motion_content | No | For 'v-motion' mode: the slide's full new content with v-motion directives embedded. Example: '<div v-motion :initial="{x: -80, opacity: 0}" :enter="{x: 0, opacity: 1, transition: {delay: 200}}">Hello</div>'. Reference: https://sli.dev/guide/animations#motion |