add_connection
Add a new database connection to your session by providing a connection URL, a credentials file, or individual parameters like type, host, and database.
Instructions
Configure a database connection for this session. Provide ONE of: (a) url — a connection URL like mysql://user:pass@host:3306/db or sqlite:///path/to/db.sqlite, (b) file — an absolute path to a .sqlmaterc (JSON) or .env file containing DB credentials, (c) individual params — type (mysql|sqlite|mssql), host, port, username, password, database, and optionally name. After adding, call list_connections to verify.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "add_connection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Connection URL (mysql://, sqlite://, sqlserver://) | |
| file | No | Absolute path to a .sqlmaterc or .env file | |
| host | No | Database host | |
| name | No | Display name for this connection | |
| path | No | File path for SQLite databases | |
| port | No | Database port | |
| type | No | Database type | |
| database | No | Database name | |
| password | No | Database password | |
| username | No | Database username |