Skip to main content
Glama

restore-log

Destructive

Restores database backups or applies one recovery step on SQL Server, Oracle, or PostgreSQL, using dry-run planning and point-in-time recovery when needed.

Instructions

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

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true. The description adds that emergency operations require confirm='yes' and a reason, and it documents dry_run and overwrite_existing behavior, but it does not clearly explain what data is restored or removed and much of the behavioral detail is buried in truncated parameter fragments.

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 purpose and emergency-operation note are front-loaded, and the request fields are presented as a list. However, the list is very long, dense, full of abbreviations and clipped text, making it harder to scan than a well-structured description should be.

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 destructive, open-world restore tool with a bare request schema, the description supplies many field-level details. It still omits critical context: that restore-log is transaction-log restore, what backup-chain prerequisites apply, and how to choose between this and the sibling restore tools. An output schema exists, so return-value documentation is not required.

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 exposes only a bare request object with 0% field coverage, so the description is the only source of parameter meaning. It enumerates many request fields and explains required db_type, target, backup paths, engine-specific options, and confirmation fields, though several entries are visibly truncated and less precise.

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 says it is 'One restore step on one engine' and that it 'Changes or removes something,' which gives a broad action and scope. However, it never explains that restore-log is specifically transaction-log restore, and it does not distinguish this from restore-full, restore-diff, restore-metadata, or verify-restore.

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 selection-related guidance is that emergency-operations commands require confirm and reason. There is no explicit when-to-use or when-not-to-use guidance versus the sibling restore tools, nor any prerequisite context such as needing a prior full restore.

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