Skip to main content
Glama

Copy the save aside

save_snapshot

Copies a world and its characters to a labeled snapshot before a mutating run, so give, time, weather, and settile changes can be undone later.

Instructions

Copy this world and its characters aside, so a run can be undone.

Args: label: The snapshot's name: letters, digits, dot, dash, underscore. world: WINDOWS path to the .wld to copy, as passed to launch. Defaults to TMODLOADER_WORLD_WIN. Refused without it when the last session from this server loaded a different world, rather than copying a world the run never touched.

WHAT THIS IS FOR. The mutating verbs write to a real install and none of that FAILS — it accumulates. Enemy NPCs do not survive a reload, so spawn looks harmless, but give writes the character file, time and weather live in the world, and settile changes it for good. The damage is invisible when it is done and shows up later as a measurement nobody doubts.

Take one before a run that mutates, and save_restore after it.

REFUSES WHILE THE GAME IS RUNNING, naming the pids. A running tModLoader owns these files and writes them out on its own schedule, so a copy taken now is mid-write. Stop the session first.

Copies the world's .wld and .twld and every .plr/.tplr — not the whole Worlds directory, which measured 41MB against 3MB for one world, and not .bak files, which are the game's own safety net.

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": {
      "label": "<label>"
    },
    "name": "save_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
labelYes
worldNo

Output Schema

NameRequiredDescriptionDefault
sizeYes
filesYes
labelYes
takenYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • addedInput schema / properties / world
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "World"
      +}
  2. First observedv0.6.3

TDQS

A4.7/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the refusal condition (running game, names pids), the default-source refusal when worlds mismatch, and exactly which files are copied (.wld, .twld, .plr/.tplr, excluding .bak and the whole Worlds directory). The annotations correctly mark this as a non-destructive write, but the description never says where the copy lands or what the return looks like.

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?

Front-loaded purpose, then Args, then a named rationale section and refusal notice — easy to scan. Some of the motivational prose ("a measurement nobody doubts") is rhetorically padded, but the anchored facts about give/time/weather/settile justify the length.

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?

Two-parameter tool with an output schema and annotations, and the description covers purpose, both arguments, file selection, and every failure mode. Nothing an agent needs to call it correctly is missing.

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

Parameters5/5

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

With 0% schema description coverage, the description carries the full burden and does: label is constrained to letters/digits/dot/dash/underscore, and world is defined as a WINDOWS path to the .wld as passed to launch, defaulting to TMODLOADER_WORLD_WIN with a stated refusal clause.

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 concrete verb and resource ("Copy this world and its characters aside") plus the purpose ("so a run can be undone"). It also implicitly separates itself from save_restore and save_snapshots by framing one as the take and the other as the restore.

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 when-to-use: "Take one before a run that mutates, and `save_restore` after it," naming the sibling that follows. It also gives the when-not: refuses while the game is running, and refuses to copy a world the run never touched when the last session loaded a different world.

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