db_register_main_connection
Add or update a main PostgreSQL/MySQL connection configuration at runtime to enable dynamic query routing, database discovery, and schema inspection.
Instructions
Dynamically add or update a main database connection configuration at runtime
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": {
"id": "<id>",
"engine": "<engine>",
"host": "<host>",
"user": "<user>"
},
"name": "db_register_main_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID for this main connection (e.g. "local_pg" or "office_mysql") | |
| host | Yes | Host address or IP | |
| port | No | Port number (default 5432 for postgres, 3306 for mysql) | |
| user | Yes | Username | |
| engine | Yes | Engine type: "postgres" or "mysql" | |
| password | No | Password | |
| description | No | Optional description | |
| persistToFile | No | Whether to save this configuration to connections.json (default true) | |
| defaultDatabase | No | Default/admin database name |