Switch Database Connection
switch_database_connectionConnect to a different DuckDB or MotherDuck database. Use absolute paths for local files, or :memory:, md:, or s3:// paths, and optionally create missing local files.
Instructions
Switch to a different database connection. For local files, use absolute paths only. The new connection respects the server's read-only/read-write mode. For local files, the file must exist unless create_if_not_exists=True (requires read-write mode).
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": {
"path": "<path>"
},
"name": "switch_database_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Database path. For local files, must be an absolute path. Also accepts :memory:, md:database_name, or s3:// paths. | |
| create_if_not_exists | No | If True, create the database file if it doesn't exist. Only works in read-write mode. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |