Skip to main content
Glama

restore-full

Destructive

Restore a database from backup on SQL Server, Oracle, or PostgreSQL as a single controlled step, with dry-run planning, overwrite safeguards, and point-in-time options.

Instructions

dbabrain common.cli restore-full: 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-full"
  }
}

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?

Annotations already declare destructive/non-readOnly/openWorld, but the description adds real context beyond them: the confirm+reason gate for emergency operations, that overwrite_existing must be true or the step stops first, that SQL Server full restore forces SINGLE_USER and raises on an existing database, and default recovery timeout of 1800s. Several clauses are truncated mid-sentence ("the ans...", "goes SI..."), which costs some precision.

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?

Front-loading the one-line purpose then a bulleted field list is a sensible structure for a 30-field request object. However, the long parenthetical engineering notes mixed with field meanings, plus truncated text, make it dense and hard to scan.

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?

Output schema exists, so return values need no explanation, and the destructive/confirm behavior is covered. Gaps remain for a high-complexity multi-engine destructive tool: truncated definitions of sqlcmd, move_files and relocate, and no guidance on engine-specific required-field combinations.

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 schema documents nothing (single untyped `request` object, 0% coverage), so the description carries the whole burden and mostly does: it enumerates ~30 request fields with per-engine meaning (oracle_sid, wal_dir, stopat, relocate semantics). Some entries are bare restatements ("The backup.", "One database.") and key ones are cut off, so it is strong but not complete.

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?

"One restore step on one engine" plus the field list make it clear this performs a restore, and the name suggests a full restore. But the phrasing is vague about what "full" means and never distinguishes the operation from siblings like restore-diff, restore-log or restore-key, which an agent must choose between.

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 only conditional guidance is that it appears on the emergency-operations list, so `confirm: "yes"` and a `reason` are needed. There is no statement of when to prefer restore-full over restore-diff/restore-log/restore-metadata, nor prerequisites for choosing an engine.

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