build_connect_data_source
Creates a data connector to an external source the app owner controls (a database, a REST API or a warehouse). Inputs: name, kind, and the connection fields for that kind (db_type, host, port, database, username, password, ssl_mode, or base_url, endpoint, auth), plus optional table_names, config, schema_namespace, test_first, project_uuid. Returns a connector_id; schemas are not bound yet. table_names is optional for a database: discovery and bind can pick the tables. Flow: build_discover_source → build_bind_data_source → build_run_data_source (sync bindings only). Credentials go to the platform and are not echoed back; read-only database credentials or the Key Store suit production. Requires a domain- or project-admin key.
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>",
"kind": "<kind>"
},
"name": "build_connect_data_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| auth | No | api kind: {type: none|api_key|bearer|basic|oauth2, ...}. | |
| host | No | Server hostname (database kinds, Fabric, ClickHouse, Snowflake, Databricks). BigQuery/Redshift take their connection settings in `config`. | |
| kind | Yes | Source kind. | |
| name | Yes | Connector name (unique within the project). | |
| port | No | Server port; omit for the dialect default (5432 PostgreSQL, 3306 MySQL, 1433 MSSQL/Fabric, 1521 Oracle, 27017 MongoDB). | |
| config | No | Extra source config (e.g. warehouse account). | |
| plugin | No | OPTIONAL, with kind='api': create a connector for this source plugin instead of the generic REST one, e.g. 'shopify' (read-only product catalog sync into catalog_item / catalog_variant), 'csv_file' or 'webhook'. Put the plugin's settings in `config`; build_list_data_sources lists each plugin's settings under plugin_sources. Secret settings (e.g. Shopify client_secret) go in `config` like a database password: sent to the platform, never echoed back. These plugins are sync-only: bind with mode='sync', then build_run_data_source (shopify has no discovery). | |
| db_type | No | database/warehouse: postgresql|mysql|mssql|oracle|mongodb|snowflake|bigquery|redshift|databricks|clickhouse|fabric. | |
| base_url | No | api kind: API base URL. | |
| database | No | database/warehouse: database name. | |
| endpoint | No | api kind: endpoint path. | |
| password | No | DB password — sent to the platform, never echoed. | |
| ssl_mode | No | database kind: TLS mode, one of disable|allow|prefer|require|verify-ca|verify-full (or the MySQL spellings disabled|preferred|required|verify_ca|verify_identity); other values are rejected. Default 'require'. Used by PostgreSQL/MySQL/MSSQL/Fabric/MongoDB; Oracle and the HTTP warehouses (Snowflake/Databricks/ClickHouse/BigQuery/Redshift) ignore it. | |
| username | No | database/warehouse: login user (prefer a read-only one). | |
| test_first | No | Probe connectivity before creating (default true). | |
| table_names | No | database/warehouse, OPTIONAL: the source tables to sync, e.g. ["customers", "orders"]. Omit when you don't know them yet — run build_discover_source next and bind the streams it returns. | |
| project_uuid | No | Project the connector belongs to (from build_list_projects); your key must be allowed to build into it. API-key callers pass it to scope the connector to that project. | |
| schema_namespace | No | Namespace for schemas from this source. |