Skip to main content
Glama

insert_slide

Insert a new slide into a deck after a specified slide or at the start; preview by default, then save the validated deck with write=true.

Instructions

Insert a new slide object into a deck file after the slide named by after_id (empty string inserts it first). The slide needs a unique id and the fields its type requires; the resulting deck must pass validate_deck. Dry-run by default: write=true saves atomically. Returns {ok, written, path, slide_id, slide_count, slide_ids}.

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": {
      "deck": "<deck>",
      "slide": "<slide>"
    },
    "name": "insert_slide"
  }
}

Input Schema

NameRequiredDescriptionDefault
deckYesDeck file inside decks/ (e.g. decks/radar-pro.json)
slideYesComplete slide object with a unique id, e.g. {"id": "s9", "type": "...", ...}
writeNoWhen true, save the validated deck back to decks/; when false (default), only return the preview
after_idNoInsert after this slide id; empty string inserts at the start

Output Schema

NameRequiredDescriptionDefault
okYes
pathYes
writtenYes
slide_idYes
slide_idsYes
slide_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.5

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: the operation is a dry-run preview unless write=true, the save is atomic, and the deck must validate first. It also discloses the exact return payload, which the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false) do not convey. No contradiction with the declared safety profile.

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 dense sentences, front-loaded with the action and position rule, then preconditions, then the dry-run/write contract and return shape. No filler and nothing repeated.

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?

Covers the mutation path, validation gate, dry-run default, and return keys, which is sufficient for a tool with an output schema. The only residual gap is that 'the fields its type requires' leaves the per-type slide shape unenumerated, forcing reliance on the schema or validate_deck.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter is already documented, and the description largely restates the schema's after_id empty-string convention and the deck path. It adds the validation constraint on the slide object but no new syntax or options beyond the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb and resource ('Insert a new slide object into a deck file') plus the insertion position semantics. It is unmistakably distinct from move_slide, update_slide, and remove_slide, so an agent can pick it without opening another schema.

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?

Gives clear preconditions: the slide needs a unique id and the fields its type requires, and the resulting deck must pass validate_deck. The dry-run-by-default / write=true contract is spelled out. It stops short of naming explicit alternatives for editing an existing slide, but the context for when to call it is unambiguous.

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