Skip to main content
Glama

edit_slides

Update existing HTML slide decks with targeted edits: replace slides, patch CSS, swap CSS variables, or modify classes. Reduces token usage by 60-90% compared to regenerating the entire deck.

Instructions

Token-efficient partial edits on a previously-generated HTML deck. Use this INSTEAD of regenerating the whole deck for small changes — it saves 60-90% tokens vs a full rewrite. Operations: replace_slide (swap one slide block by 1-indexed slideIndex), patch_css (append CSS rules to ), swap_token (replace a CSS variable's value, e.g. {"--coral": "#FF0000"}), patch_class (add/remove a class on a specific slide, e.g. {"add": "dark"}). Reads from cache or htmlPath; saves the updated HTML and returns the new htmlPath. After editing, show the htmlPath as a preview artifact and STOP — do NOT call render_slides until the user confirms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlPathNoPath to HTML to edit. Falls back to cached HTML from last create_slides call.
operationYesEdit operation: replace_slide swaps one slide block; patch_css appends CSS rules to <style>; swap_token replaces a CSS variable's value; patch_class adds/removes a class on a slide.
slideIndexNo1-indexed slide position. Required for replace_slide and patch_class. Omit for global ops (patch_css, swap_token).
payloadYesFor replace_slide: the new <div class="slide">...</div> HTML string. For patch_css: a CSS rules string. For swap_token: an object {tokenName: newValue}, e.g. {"--coral": "#FF0000"}. For patch_class: an object {add?: string, remove?: string}.
Behavior4/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, but description adds context: reads from cache or htmlPath, saves updated HTML, returns new htmlPath, and estimates token savings. It transparently describes behavior beyond annotations.

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?

Concise and well-structured: starts with purpose and efficiency claim, then lists operations in bullet format, and ends with clear behavioral instructions. Every sentence adds value.

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

Completeness5/5

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

Even without an output schema, the description covers return value (new htmlPath) and behavior (caching, fallback). It provides enough context for correct invocation across all operations.

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 100% with descriptions for all parameters. The description further clarifies payload formats for each operation and slideIndex requirements, adding utility beyond the schema.

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

Purpose5/5

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

The description clearly states the tool is for 'Token-efficient partial edits on a previously-generated HTML deck', distinguishing it from sibling tools like create_slides and render_slides. It lists specific operations, making the purpose unambiguous.

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

Usage Guidelines5/5

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

Explicitly instructs to use this instead of regenerating the whole deck for small changes and provides a clear stop condition after editing: 'show the htmlPath as a preview artifact and STOP — do NOT call render_slides until the user confirms.' No ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/06ketan/slideshot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server