Skip to main content
Glama

manage_backups

List, restore, purge, or snapshot automatic Word document backups stored in hidden .ks4w-backups folders, with dry-run reporting and atomic restore that rotates current content into prev for undoability.

Instructions

Manage the automatic backups under the hidden .ks4w-backups/ folder next to each mutated document: two stable slots per document, prev (state before the most recent mutation) and anchor (session start). action='list': slot files with sizes and mtimes, legacy .bak- files, and orphaned slot folders whose source document is gone; give file_path for one document or directory for a folder. action='restore': overwrite file_path with a backup; source is 'prev', 'anchor', or a legacy .bak- path. The current content rotates into prev FIRST, so a restore is itself undoable; the payload is validated before the atomic replace, and documents open in Word are refused. action='purge': delete backups; scope: 'legacy', 'orphans', or 'slots'. dry_run defaults to TRUE (report only); dry_run=False deletes. Exact paths and sizes are reported either way. action='snapshot': save a DTG-stamped permanent copy of file_path, YYYYMMDD_HHMM_.docx (an existing leading DTG is replaced, not stacked), optional short label suffix, optional dest_dir. Snapshots are permanent keepers: the slots rotate on every mutation, snapshots are never auto-pruned and no purge scope touches them. Never overwrites (collisions get a numeric suffix); the source document is not modified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelNo
scopeNo
actionYes
sourceNo
dry_runNo
dest_dirNo
directoryNo
file_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / dest_dir
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / label
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Addedv1.6.1

TDQS

A5/5.0
Behavior5/5

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

The description discloses substantial behavioral details beyond the readOnlyHint false annotation: restore rotates current content into prev so a restore is undoable, documents open in Word are refused, validation precedes atomic replace, purge only deletes when dry_run=False, snapshots are never auto-pruned and are untouched by purge scopes, and collisions get numeric suffixes. These traits are essential for safe invocation.

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?

The description is long but densely information-packed, with each sentence serving a distinct purpose. It is front-loaded with the core resource and then organized by action, making it easy to scan. Every sentence earns its place, including caveats about undoability, Word-locked files, and snapshot permanence.

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 multi-action tool with eight parameters and no schema-level descriptions, the description is remarkably complete. It covers all actions, all relevant parameter semantics, safety defaults, destructive behavior, naming rules, and operational edge cases. Since an output schema exists, the description does not need to detail return values, and it still notes that exact paths and sizes are reported.

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?

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does. Every parameter is effectively explained: action values, source options ('prev', 'anchor', legacy .bak-*), scope options ('legacy', 'orphans', 'slots'), dry_run default behavior, dest_dir optionality, label as short suffix, and file_path vs directory usage. It goes beyond the schema by explaining naming conventions and collision handling.

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 clearly states the tool's purpose: managing automatic backups under a hidden .ks4w-backups/ folder. It enumerates four specific actions (list, restore, purge, snapshot) and identifies the exact resource and behavior for each, making it readily distinguishable from sibling tools that operate on document content rather than backups.

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?

Each action is given an explicit use case: list for inspecting slots and orphans, restore for overwriting a file from a backup, purge for deleting backups with scoped options, and snapshot for creating permanent copies. The description also states critical operational defaults such as dry_run defaulting to TRUE, and it clarifies when file_path vs directory should be used.

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