profile_add
Add or update a database connection profile with optional SSH tunneling, test before saving, and set as default.
Instructions
Add or update a named connection profile at runtime and persist it. Tests the connection first (set test=false to skip). Profiles are read-only unless allow_writes=true. make_default=true switches the default profile. For a database only reachable via SSH, set ssh_host (an ssh destination or ~/.ssh/config alias; BatchMode, so keys/agent must work non-interactively) — a tunnel is opened automatically and kept alive; ssh_remote_host/ssh_remote_port default to the DSN's host/port as seen FROM the ssh host (usually 127.0.0.1:5432).
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>",
"dsn": "<dsn>"
},
"name": "profile_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsn | Yes | ||
| name | Yes | ||
| test | No | ||
| ssh_host | No | ||
| description | No | ||
| allow_writes | No | ||
| make_default | No | ||
| ssh_remote_host | No | ||
| ssh_remote_port | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |