Skip to main content
Glama

Restore backup

restore_backup
Idempotent

Restore an Excel workbook from its .bak backup file, atomically overwriting the target .xlsx/.xlsm to recover a previous state.

Instructions

Replace a workbook with one of its .bak backups, atomically.

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": {
      "backup_path": "<backup_path>",
      "target_path": "<target_path>"
    },
    "name": "restore_backup"
  }
}

Input Schema

NameRequiredDescriptionDefault
backup_pathYesThe .bak file to restore from (created by writes with backup enabled).
target_pathYesThe .xlsx/.xlsm workbook to overwrite.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • addedInput schema / properties / backup_path / description
      Added value: +"The .bak file to restore from (created by writes with backup enabled)."
    • addedInput schema / properties / target_path / description
      Added value: +"The .xlsx/.xlsm workbook to overwrite."
  2. Addedv0.3.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations only declare openWorldHint=false and idempotentHint=true; there is no destructiveHint, so the description carries the burden of signaling that target_path is overwritten, which "Replace a workbook" does. "Atomically" usefully discloses that no partial state results from a failure, but it says nothing about whether the prior target contents are preserved, what happens if the backup is missing or corrupt, or what error surface to expect.

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?

A single ten-word sentence, front-loaded with the destructive verb and resource, with the qualifier "atomically" placed at the end where it reads as a guarantee rather than a hedge. Nothing is padded and nothing important is buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, parameters are fully documented, and an output schema exists, so the description needn't explain return values. However, for a destructive restore it omits the recovery posture — whether the current workbook is copied aside, and what failure modes look like — leaving the agent to infer the risk profile.

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 coverage is 100% and both parameters already document their role, including the provenance of backup_path and the accepted .xlsx/.xlsm extensions for target_path. The description adds no path syntax, format constraints, or relationship between the two paths beyond what the schema provides, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Replace a workbook with one of its .bak backups" states a specific verb and resource, and the scope (only .bak backups of that workbook) is unambiguous. No sibling in the catalog performs a restore-like operation, so differentiation is implicit rather than stated, which keeps it just short of a 5.

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

Usage Guidelines2/5

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

The description offers no when-to-use or when-not-to-use guidance, no prerequisites (e.g. that a backup must exist and be produced by a write with backups enabled), and no alternative for reverting changes. The only hint at the precondition lives in the schema's backup_path description, not here.

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