add_connection
Register or replace a SQL Server connection profile at runtime and test it, so new databases can be queried without restarting the server.
Instructions
Register (or replace) a connection profile at runtime and test it.
auth: 'windows' = the current Windows logon (integrated/trusted), 'sql' = SQL login (user + password). Prefer password_env (name of an environment variable) over passing a password in chat. server: 'host', 'host\INSTANCE' or 'host,port'.
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": {
"name": "<name>",
"server": "<server>"
},
"name": "add_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | windows | |
| name | Yes | ||
| port | No | ||
| user | No | ||
| driver | No | auto | |
| server | Yes | ||
| encrypt | No | yes | |
| database | No | master | |
| max_rows | No | ||
| password | No | ||
| readonly | No | ||
| make_default | No | ||
| password_env | No | ||
| query_timeout | No | ||
| trust_server_certificate | No |