Skip to main content
Glama

update_slide

Replace an existing slide's Markdown content by 1-based slide number, with dry_run to preview the diff before writing.

Instructions

Replace the content of an existing slide (1-based slide number). The global frontmatter is not counted. Replaces the entire slide content including any existing per-slide frontmatter. 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": {
      "slide_number": "<slide_number>",
      "new_content": "<new_content>"
    },
    "name": "update_slide"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoPreview the change without writing slides.md. Returns dryRun, wouldWrite, and diff.
new_contentYesFull replacement content for the slide in Markdown. May include an embedded per-slide frontmatter block at the top (e.g. '---\nlayout: center\nclass: text-center\n---\n# Title'). Replaces the entire slide including any existing per-slide frontmatter. 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).
slide_numberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden, and it does disclose the key destructive trait: the entire slide is replaced, including any existing per-slide frontmatter. It also clarifies the frontmatter counting rule for slide numbering and the dry-run preview path. It is silent, however, on what happens for an out-of-range slide number or what a successful write returns.

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

Conciseness4/5

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

Four short sentences, front-loaded with the core action and scope, no filler. The second sentence partially restates the first, but it earns its place by adding the per-slide frontmatter destruction detail.

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 three-parameter mutation tool with no annotations and no output schema, the description covers the essentials: destructive scope, numbering semantics, and a preview escape hatch. Error behavior and confirmation output are the remaining gaps.

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?

Schema coverage is 67%, and the description compensates by explaining that slide_number is 1-based and excludes global frontmatter, plus what dry_run produces. The rich new_content semantics (frontmatter embedding and base-style protection) live in the schema rather than the description, which is appropriate.

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?

The description opens with a specific verb and resource ('Replace the content of an existing slide'), which cleanly separates it from creation-oriented siblings like add_slide. It does not name a sibling explicitly, so it stops short of a 5.

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

Usage Guidelines4/5

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

It clearly scopes use to slides that already exist and prescribes dry_run=true for previewing before writing. There are no explicit exclusions or named alternatives (e.g., which tool to use for a new slide), which keeps it from a 5.

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