Declare a database datasource
connect_datasourceDeclare a database datasource, then hand its credential Setup pane to a person. Administrator-only and requires the project's datasource-management grant. Accepts no credential or connection fields and returns none: the credential is entered in the linked pane and never passes through this conversation. If provider is invalid, the invalid_parameters refusal lists known_providers for that database type.
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": {
"type": "<type>",
"name": "<name>"
},
"name": "connect_datasource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique datasource name shown in the project | |
| type | Yes | Registered database adapter type, such as postgres; use create_service_datasource for api | |
| provider | No | Optional provider variant from the datasource type catalogue, such as neon | |
| setup_step_id | No | Optional setup step UUID this call fulfils (Administrator only). Pass a planned entry you recorded, or the id of the step this Project already opened for the same component. Otherwise the same MCP session's oldest unbound plan of this kind matching its subject hint is used, otherwise a new entry opens. A committed creation whose journal binding fails still succeeds with a warning naming this entry; do not repeat creation. Other steps this call opens record the step's Application unless application_id names one. | |
| application_id | No | Optional Application UUID whose build this call serves (Administrator only). Setup steps this call opens record it, so they show on that Application's build screen; the resources themselves stay shared by the Project. A shared step it reuses keeps the Application it was opened for, so a step it returns may be watchable with get_setup_journal only without application_id. Use the build's application_id, the one you call describe_application with. |