Skip to main content
Glama

Load a dump into a site's database

db_restore
Destructive

Load a .sql or .sql.gz dump into a site's database, with the site's own credentials: the undo for a bad change, or a restore from a backup. Pass file as list_dumps shows it, or any .sql / .sql.gz file on the server (a backup the user keeps). The database as it is now is dumped first (before-restore-...), so the restore itself can be undone with the same tool. Tables in the file replace the tables of the same name; tables the file does not mention stay. A dump from another database or another site version can break the site: check what the file holds first (read_file the first lines, or list_dumps). Runs in the background: follow with job_output. Say beforehand what will be lost (everything in those tables since the dump). For a few rows or one table, load the dump into a scratch database instead (playbook restore).

Input Schema

NameRequiredDescriptionDefault
whyNoOne plain sentence for the user, shown on the approval page if this call needs their approval: what it does and why it is needed.
fileYesThe dump to load: a path from list_dumps, or an absolute path to a .sql or .sql.gz file on the server
siteNoSite root folder, like /var/www/shop, or one of the site's domains. Optional when the server has one site (see list_sites).
serverNoServer name or id. Optional when the account has one server.
approval_idNoOnly when repeating a call the user approved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructive/openWorld annotations: it discloses that the current DB is dumped first (before-restore-...) so the restore is self-undoable, that same-name tables are replaced while unmentioned tables persist, that a foreign/newer dump can break the site, and that it runs in the background (follow with job_output). This is unusually rich behavioral context.

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?

Front-loaded with the core action, then scoped to intent, mechanics, and risks. It is a dense single paragraph that runs long, but nearly every sentence carries operational value; only minor tightening is possible.

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, non-idempotent restore with no output schema, the description covers destruction scope, reversibility, background execution/follow-up, and file validation. An agent has everything needed to call it safely.

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?

Schema coverage is 100% (baseline 3), and the description still adds value by clarifying what 'file' accepts — a path as list_dumps shows it, or any .sql/.sql.gz on the server — and cross-references list_dumps/read_file for validating the file. The remaining params are fully covered by the schema.

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?

States a specific verb and resource ('Load a .sql or .sql.gz dump into a site's database') plus its two primary intents (undoing a bad change, restoring from backup). An agent can distinguish it from db_dump (the inverse) and db_query without opening schemas.

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

Usage Guidelines5/5

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

Explicitly says when to use it, when not to ('For a few rows or one table, load the dump into a scratch database instead (playbook restore)'), and names the alternatives (list_dumps, read_file). Nothing is left to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources