Skip to main content
Glama

Manage Backups

manage_backups
Destructive

Manage automatic backups for Word documents: list, restore, purge, or snapshot backup copies with dry-run support.

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

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses that restore rotates current content into prev first, making restores undoable, and that purge deletes only when dry_run=False. It also explains snapshot permanence, collision behavior, atomic replacement, and Word-open refusal, which gives the agent a strong safety model.

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 dense but every sentence adds necessary behavioral or parameter information. It front-loads the location and slot model, then organizes actions in a logical progression, making a complex multi-action tool easy to scan.

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?

Given the tool's four distinct actions, 8 parameters, and destructive potential, the description covers the full decision space: what each action does, which parameters apply, safety guards, naming behavior, and what gets reported. The existence of an output schema means return-value details are not needed, and no critical gap remains.

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 succeeds: it explains action values, source choices, purge scopes, dry_run semantics, dest_dir, label, file_path, and directory. An agent can correctly choose values without opening any external documentation.

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 names a specific resource (hidden .ks4w-backups/ folders) and a clear set of actions (list, restore, purge, snapshot), so the agent knows exactly what the tool operates on. It is immediately distinguishable from the document-editing sibling tools and from backup operations that might mutate documents directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each action is given a concrete purpose: list reports, restore overwrites, purge deletes, snapshot preserves. It also notes the dry_run default and the refusal of documents open in Word, which helps avoid misuse. It doesn't explicitly name what not to use this tool for, but no sibling tool overlaps with backup management, so the lack of an explicit exclusion is minor.

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