Skip to main content
Glama

replace_scene

Destructive

Replace the entire Excalidraw canvas with a complete scene using an expected revision from read_scene, so stale edits are rejected and unrelated elements and files are preserved.

Instructions

Replace the entire canvas with a complete .excalidraw scene. First call read_scene and supply its revision as expectedRevision. Preserve unrelated elements and image files. A stale revision is rejected; read again and merge changes instead of forcing an overwrite.

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": {
      "scene": "<scene>",
      "expectedRevision": "<expectedRevision>"
    },
    "name": "replace_scene"
  }
}

Input Schema

NameRequiredDescriptionDefault
sceneYes
expectedRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false. The description adds valuable behavior beyond those annotations: optimistic concurrency via expectedRevision, rejection of stale revisions, and the requirement to preserve unrelated elements and image files. It does not describe authorization needs or the response shape, which keeps it short of a 5.

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?

The description is three focused sentences with the replacement rule front-loaded, followed by the read-before-write workflow and stale-revision handling. It is compact and every sentence contributes operational guidance, though it could be slightly tighter.

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 destructive, nested-object mutation with no output schema, the description covers the critical safety and concurrency workflow: read first, supply the revision, preserve unrelated content, and recover from stale revisions by merging. It omits return-value behavior, but otherwise provides enough context to invoke the tool correctly.

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 description coverage is 0%, so the description needs to compensate. It does explain that expectedRevision must come from read_scene and that scene is a complete .excalidraw payload, but it leaves the nested scene fields (elements, files, appState, source, version) and revision format details undocumented.

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 states a precise verb and resource: 'Replace the entire canvas with a complete .excalidraw scene.' This clearly distinguishes it from partial-update siblings such as append_elements and update_elements by emphasizing a full-canvas replacement.

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?

It gives an explicit prerequisite ('First call read_scene'), explains how to use the returned revision, and states what to do when the revision is stale: read again and merge rather than force an overwrite. This is actionable when-to-use and when-not guidance.

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