Skip to main content
Glama

Snapshot and diff

snapshot

Save game instance state in a named slot, then compare it later to list added, removed, and changed properties around an action.

Instructions

Save the state of part of the game and later see exactly what changed. action take records the instances under a path (names, classes and the properties that matter for each class, or the ones you list) in a named slot; action diff compares the slot with the game as it is now and lists what was added, removed and changed (property, before, after); action list shows the slots; action delete removes one. Use it around an action: take, let the user do something or trigger it with gui_interact, then diff. Snapshots live in the executor's memory, at most 10 slots, and are gone when the game is left. Requires the connected state.

Input Schema

NameRequiredDescriptionDefault
keepNodiff: replace the saved slot with the current state afterwards, so the next diff starts from here.
nameNoSlot name (default 'default').
pathNotake: dotted path of the root (default game.Workspace).
depthNotake: how many levels below the root to record (default 4).
limitNodiff: entries per list (default 50).
actionNotake (default), diff, list or delete.
clientNoClient id from list_clients, for example c2. Defaults to the client that connected last.
propertiesNotake: property names to record for every instance. Default: a sensible set for each class (Position, Size, Anchored, Text, Value, Health and so on).
max_instancesNotake: stop after this many instances (default 1500).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag it as non-read-only and non-destructive; the description goes well beyond by disclosing that snapshots live in the executor's memory, are capped at 10 slots, and vanish when the game is left. It also spells out the diff output shape (property, before, after) and the take defaults, which is real behavioral context not available in structured fields.

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 front-loaded with the purpose before breaking down actions, and each action gets a tight clause. It is slightly dense in a single block and repeats the take default that also appears in the schema, but no sentence is wasted.

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?

With no output schema, the description compensates by describing the diff result shape (added/removed/changed with property, before, after) and the list action's output. Combined with the memory lifetime and slot cap, an agent has everything needed to call it 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 100%, so every parameter is already documented with defaults and ranges. The description adds only the properties-per-class default note and the notion of a 'named slot', which is marginal value over the schema, so the baseline of 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 opening sentence states a concrete verb pair and resource ('save the state of part of the game and later see exactly what changed'), then enumerates each action (take/diff/list/delete) with its specific effect. This clearly separates it from siblings like inspect_instance or set_property, which read or mutate rather than capture-then-compare.

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?

Explicit workflow guidance: 'Use it around an action: take, let the user do something or trigger it with gui_interact, then diff.' It also names the precondition ('Requires the connected state') and implicitly routes the agent to gui_interact as the trigger mechanism, leaving little to infer.

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