db_register_sub_connection
Registers a sub-connection (database alias) under an existing main connection, enabling query routing to a specific database without adding a new server configuration.
Instructions
Dynamically register a sub-connection (database alias) under an existing main connection
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": {
"mainId": "<mainId>",
"id": "<id>",
"database": "<database>"
},
"name": "db_register_sub_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Sub-connection alias ID (e.g. "sales_db") | |
| mainId | Yes | Existing main connection ID | |
| database | Yes | Actual database name on the main server | |
| readOnly | No | Set to true to prevent write operations | |
| description | No | Optional description | |
| persistToFile | No | Whether to save to connections.json (default true) |