Skip to main content
Glama

add_slide

Add a new Markdown slide to the current Slidev presentation, optionally at a specific layout and 1-based index; use dry_run=true to preview the slides.md diff before writing.

Instructions

Add a new slide to the current presentation. Optionally specify a layout and an insertion index (1-based). If index is omitted, the slide is appended at the end. Set dry_run=true to preview the slides.md diff without writing.

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": {
      "content": "<content>"
    },
    "name": "add_slide"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNo
layoutNo
contentYesFull slide content in Markdown. May include an embedded per-slide frontmatter block at the top (e.g. '---\nlayout: center\nclass: text-center\n---\n# Title'). When including a 'class' field in the frontmatter with Tailwind/UnoCSS utility classes, follow the base-style protection rule: BASE STYLE PROTECTION RULE — Do NOT add Tailwind/UnoCSS classes that override the MCP base styles already defined in style.css, unless the user explicitly requests it. FORBIDDEN — typography overrides (style.css controls these): text-xs/sm/base/lg/xl/2xl..9xl (font sizes set per element), font-sans/serif/mono (Inter + JetBrains Mono already applied), font-thin..black (font-weight set per element), leading-* (line-height set on p/li), tracking-* (letter-spacing set on h1/h3). FORBIDDEN — color overrides (breaks dark palette #0d0d0f/#e8e8f0): bg-white, bg-gray-50..200, bg-slate-50..100, bg-zinc-50..100, bg-neutral-50..100, bg-stone-50..100, text-black, text-gray-700..900, text-slate-800..900, text-zinc-800..900, border-gray-200..300, border-white, border-slate-200..300, shadow-*, ring-*. ALLOWED — layout/positioning only (no style.css conflict): text-center/left/right, flex, grid, items-*, justify-*, flex-col/row, p-*, m-*, gap-*, w-*, h-*, max-w-*, overflow-*, relative, absolute, z-*, col-span-*, row-span-*, rounded-*, self-*, truncate, line-clamp-*. ALLOWED — dark-compatible colors (only when color is explicitly needed): bg-transparent, bg-black/*, bg-gray-800..900, bg-zinc-800..900, text-white, text-gray-100..400, text-slate-100..300. PREFERRED: skip color/typography classes entirely — use <style scoped> with CSS variables: var(--color-bg), var(--color-text), var(--color-accent), var(--color-accent2), var(--color-accent3), var(--color-surface), var(--color-border).
dry_runNoPreview the change without writing slides.md. Returns dryRun, wouldWrite, and diff.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It does add real behavioral facts beyond structure: the write target is slides.md, dry_run returns a diff without writing, and omission of index appends. It omits failure behavior, whether existing slides shift/renumber, and any permission or initialization prerequisites for a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the primary action, then optional parameters, then the preview escape hatch. Nothing is padded and the dry_run affordance is placed last where it belongs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter mutation tool with no annotations and no output schema, coverage is solid: action, insertion position, layout, and dry-run preview are all addressed, and the heavy content-format burden is handled in the schema. Only error/renumbering behavior is left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 50% schema coverage, the description meaningfully compensates: it explains index is 1-based and defaults to append, layout is optional, and dry_run previews a diff. That is semantics the schema alone does not supply, though the layout parameter's accepted values remain unstated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: "Add a new slide to the current presentation." An agent can distinguish this from delete_slide or update_slide on the name alone, but the description never differentiates itself from the plural sibling add_slides, leaving a real ambiguity about single vs. bulk insertion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives useful in-tool guidance: index optional, appended at end when omitted, dry_run for preview. It never says when to prefer add_slides over repeated calls, when to use update_slide instead, or what preconditions exist (must a presentation be initialized?), so usage is only implied for the sibling comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.