import_markdown
Imports a full multi-slide Markdown document into the current Slidev presentation from a file path or inline content, replacing or appending slides with validation and optional dry-run preview.
Instructions
Import a full multi-slide Markdown document into the current presentation in a single call — the token-efficient way to build or replace a large deck. Pass path to read the Markdown from disk (content never touches the model's tokens) or content to import inline. mode=replace swaps the entire slides.md (backing up the old one to slides.md.bak); mode=append adds the slides after the existing ones. The document is validated before writing; structural errors abort the import. Set dry_run=true to preview the diff without writing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "import_markdown"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'replace' (default): the imported Markdown becomes the entire slides.md (the previous slides.md is first copied to slides.md.bak). 'append': the imported slides are appended after the existing ones, keeping the current global frontmatter. | replace |
| path | No | Path (relative to the project root) of a Markdown file to import, e.g. 'base.md'. PREFER THIS over `content` for bulk imports: the file is read on the server, so the slide Markdown never passes through the model's tokens. This is the cheapest way to build a deck whose content already exists on disk. | |
| content | No | Full multi-slide Markdown to import inline. Use only when the content does not already exist as a file on disk; otherwise pass `path` to avoid spending tokens on the slide content. | |
| dry_run | No | Preview the change without writing slides.md or creating a backup. Returns dryRun, wouldWrite, diff. |