Skip to main content
Glama

db_restore

Restore a database backup over the live tracker, overwriting current data. Creates a safety backup first and requires confirmation before proceeding.

Instructions

Restore a backup over the live tracker. DESTRUCTIVE and irreversible: it takes a safety backup first and refuses without confirm: true. Restoring the wrong file over a working tracker is the mistake with no undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoDirectory identifying the project and the tree. Defaults to this session's working directory, which in a git worktree is that worktree.
nameYesThe backup filename, from db_backups.
confirmYesMust be true. This overwrites everything currently tracked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are present, so the description carries the full behavioral burden. It explicitly warns that the operation is DESTRUCTIVE and irreversible, discloses the automatic safety backup, and explains the confirmation gate. It also identifies the primary failure mode: restoring the wrong file leaves no undo.

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?

Three short sentences lead with the action, then front-load the critical safety warning. Each sentence adds either scope or risk information, with no filler.

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 destructive restore tool with three fully documented parameters and no output schema, the description gives an agent everything essential: what the tool overwrites, why confirmation is mandatory, what safety mechanism exists, and the primary failure mode. Return-value documentation is not necessary for safe invocation here.

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 percent; every parameter already has a description, including the backup filename source, the confirm semantics, and the cwd default. The description reinforces the danger of confirm but adds no new parameter-level facts beyond the schema, so the baseline 3 applies.

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 opens with a concrete verb and object: restore a backup over the live tracker. This clearly places it among the backup tools and distinguishes it from siblings like db_backup and db_backups by direction, and from stash_restore by naming backups explicitly.

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?

It establishes the invocation context—restoring a backup over the working tracker—and states the required guardrail: confirm must be true and a safety backup is taken first. It does not name alternatives or give when-not-to-use guidance, but the context is clear enough for this destructive operation.

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