database_import
Import SQL dumps into databases via SSH. Use dry_run to preview before destructive execution.
Instructions
Load a .sql dump file (already present on the host) INTO a database via SSH (mysql). DESTRUCTIVE: the SQL runs as-is, so a dump containing DROP/CREATE will replace existing tables and data. The source file must live inside the staging dir (default /root/fastpanel-mcp-dumps, override with FASTPANEL_DUMP_DIR) — paths elsewhere are rejected, so scp the file there first (or produce it with database_dump). Targets the local MySQL via root socket auth. WRITE — set dry_run:true to preview the command, confirm:true to execute. Requires SSH configured (FASTPANEL_SSH_HOST).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database_id": "<database_id>",
"source_path": "<source_path>"
},
"name": "database_import"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| dry_run | No | ||
| database_id | Yes | Target database id from databases_list | |
| source_path | Yes | Absolute path to the .sql file, inside the staging dir |