Skip to main content
Glama

Restore a Playground canvas snapshot

playground_canvas_snapshot_restore
DestructiveIdempotent

Replace the whole canvas with a snapshot, as one new revision. The current canvas is snapshotted first, so the restore can itself be undone. Discards every change made after the snapshot; prefer playground_run_revert for undoing one run.

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": {
      "projectId": "<projectId>",
      "snapshotId": "<snapshotId>",
      "expectedRevision": "<expectedRevision>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "playground_canvas_snapshot_restore"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectIdYesID of the Playground project chosen for this task; obtain it from project creation, an explicit project link or current context.
snapshotIdYesSnapshot ID returned by canvas_snapshots_list to restore.
idempotencyKeyYesUnique key for this request; reuse only when retrying the identical request after a lost response. Use a new key after quoting or changing inputs.
expectedRevisionYesCurrent canvas revision from canvas_read; on revision_conflict, read again and rebuild the change.

Output Schema

NameRequiredDescriptionDefault
statusYes
replayedYes
revisionYes
snapshotIdYes
snapshotRevisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds context the annotations cannot: the pre-restore snapshot makes the operation itself undoable, and the blast radius is every change after the snapshot. That is exactly the extra behavioral detail an agent needs before invoking a destructive write.

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 what changes ('Replace the whole canvas') and closed with the safety alternative. No sentence is redundant; even the alternative-tool reference carries routing 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?

For a destructive, non-open-world mutation with an output schema present, the definition covers scope, reversibility, and the alternative path. Return values are covered by the output schema and conflict handling by the expectedRevision field description, so nothing an agent needs is missing.

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 100%, so projectId, snapshotId, idempotencyKey, and expectedRevision are already fully documented, including the revision-conflict recovery path. The description adds no parameter-level syntax or format beyond what the schema carries, so the baseline 3 applies.

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 opens with a specific verb and resource: 'Replace the whole canvas with a snapshot, as one new revision.' The 'whole canvas' scope distinguishes it from the granular mutation siblings such as playground_canvas_apply_operations and playground_canvas_update_text, and it names playground_run_revert as the narrower-scope alternative.

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 states the condition that should route the agent elsewhere ('prefer playground_run_revert for undoing one run') and effectively gives a when-not via 'Discards every change made after the snapshot.' An agent can decide between whole-canvas restore and single-run undo without opening either schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.