Skip to main content
Glama

restore-diff

Destructive

Run one database recovery step on a chosen engine, with backup restore, file relocation, point-in-time recovery, overwrite checks, and dry-run planning.

Instructions

dbabrain common.cli restore-diff: One restore step on one engine. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • db_type (required): The engine.

  • target: The instance - an input_remote_target.

  • sqlcmd: SQL Server: run the step with sqlcmd where the server is instead of a driver from here - the run-sqlcmd request less its sql (instance, sqlcmd_path, username, password, timeouts, via, host). One file per call; the ans...

  • backup_path: The backup.

  • backup_paths: Several, in order.

  • database_name: One database.

  • move: SQL Server: file moves.

  • move_files: SQL Server full: {data, log} - where the two files go; the logical names are read on the server (RESTORE FILELISTONLY), and the database goes SINGLE_USER first.

  • relocate: SQL Server full onto another server: every file RESTORE FILELISTONLY names goes to the target's default data / log folder - or data_dir / log_dir - as _; {} for both defaults; the database goes SI...

  • replace: SQL Server: WITH REPLACE.

  • overwrite_existing: Whether the step may replace what the target holds; without true it stops first (0.26.0, G2.10; every engine and any state since 0.39.0). SQL Server full: a database of that name in any state raises before the batch t...

  • stats: SQL Server: progress every n percent.

  • with_recovery: Bring it online after.

  • stopat: A point in time.

  • host: Oracle / PostgreSQL: the host.

  • backup_location: Oracle: where the pieces are.

  • encryption_password: Oracle: the backup's password.

  • mode: Oracle: the RMAN mode.

  • oracle_sid: Oracle: the SID.

  • bin_dir: PostgreSQL: the binaries.

  • data_dir: PostgreSQL: the data directory.

  • run_as: PostgreSQL: the OS user.

  • staging_dir: PostgreSQL: where pieces are staged.

  • wal_dir: PostgreSQL: the WAL archive.

  • dry_run: Plan only: change nothing.

  • timeout_seconds: How long to wait.

  • recovery_timeout_seconds: PostgreSQL into a container, with wal_dir: how long to wait for recovery to end (default 1800). A container that stops or restarts ends the wait at once.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "restore-diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior4/5

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

Beyond the annotations, the description discloses that this changes or removes something, that emergency commands require confirm and reason, that overwrite_existing gates replacement, and that dry_run plans without changing anything. These are meaningful behavioral details for a destructive restore operation, though some engine-specific safety behavior is truncated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the tool's basic action and confirm/reason requirement, then uses a readable bullet list for request fields. However, it is very long, contains fragmented and truncated explanations, and mixes many engine-specific options without organizing them by engine or task.

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?

For a complex, destructive, multi-engine restore tool with an uninformative schema, the description provides extensive field-level context and safety notes. It still leaves gaps around sibling selection, several truncated option meanings, and how the many engine-specific paths fit together.

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

Parameters4/5

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

The input schema only exposes a generic `request` object at 0% description coverage, so the description carries the full burden and does so by listing many request fields with engine-specific meanings. The value is substantial, but several field explanations are truncated and not all defaults or constraints are clear.

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

Purpose3/5

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

The description states a restore-related verb and says it is 'One restore step on one engine,' but it does not explain what a 'diff' restore is or how it differs from siblings like restore-full, restore-log, restore-key, and restore-metadata. An agent can infer it performs some restore step, but the purpose remains vague for selection.

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 gives a prerequisite for emergency-operations commands (confirm: 'yes' and a reason), but it never says when to use restore-diff instead of the other restore tools. There is no explicit when-to-use or when-not-to-use guidance.

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