Skip to main content
Glama

Restore Journal from Backup

restore_backup
Destructive

Restores the journal database from a backup file, replacing all current data. An automatic backup is created first to protect existing journal contents.

Instructions

Restore the journal database from a backup file. WARNING: This replaces all current data. Enforce single-writer / single-instance only for restore-capable deployments. An automatic backup is created before restore.

Input Schema

NameRequiredDescriptionDefault
confirmNoMust be set to true to confirm the restore operation
filenameNoBackup filename to restore from (e.g., backup_2025-01-01.db). Anti-Hallucination Hint: Property is strictly `filename`, not `file`. You can pass positional args: mj.backup.restoreBackup("filename.db", true).
use_test_dbNo

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
detailsNoAdditional error context
messageNo
successYes
warningNo
categoryNoError category (validation, query, connection, internal)
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
restoredFromNo
newEntryCountNo
revertedChangesNo
aggregated_errorsNoDetails of individual errors in a multi-step operation
previousEntryCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds genuinely new behavior: that ALL current data is replaced and that an automatic backup is created before the restore. Those two facts materially change an agent's risk calculus and are not derivable from the 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?

Three tight sentences with the destructive warning placed immediately after the purpose, which is the right front-loading for a data-destroying operation. The single-writer sentence is slightly jargon-heavy but still earns its place as a deployment constraint.

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?

An output schema exists, so return values need not be explained. For a destructive, zero-required-parameter tool, the description covers purpose, data loss, pre-restore backup, and deployment constraints — everything needed to invoke it responsibly.

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

Parameters2/5

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

Schema coverage is 67%: confirm and filename are well documented, but use_test_db has no description anywhere. The description adds nothing about any parameter — not the required confirmation flag, not the filename format, not the effect of use_test_db — so it fails to compensate for the coverage gap.

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?

States a specific verb and resource ("Restore the journal database from a backup file"), which cleanly separates it from backup_journal, list_backups and team_list_backups in the sibling set. It never names an alternative explicitly, so it stops short of full sibling differentiation.

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

Usage Guidelines3/5

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

The deployment constraint ("Enforce single-writer / single-instance only for restore-capable deployments") gives a real precondition for use, but there is no guidance on how to pick a filename (e.g., call list_backups first) or when restore is the wrong choice versus restore_entry or import_markdown.

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

Deploy Server

Other Tools