Create a service datasource
create_service_datasourceCreate a service datasource and hosted credential page. Read list_service_providers first; agree service, purpose and credentials. The page lasts one hour from issue; opening or reloading does not use it up, completing setup does. Cards: provider; Custom: credentials, OAuth auth (type oauth2, HTTPS resource, optional scopes), or no_credentials: true. MCP cards require mcp: {url, auth?, headers?, oauth?}; directory cards use their card URL. Do not combine MCP with credentials/no_credentials/top-level auth, or OAuth auth with credentials/no_credentials. Detection returns mcp.detected or a safe error and failed datasource_id; fix and retry or delete. Use Test and finish. Admin plus datasource-management grant. Returns datasource_id, configuring, human_link and declaration. A credential never passes through this conversation; enter it on the hosted page. OAuth: sign in with no pasted token. Saving the sole required typed credential finishes setup automatically; otherwise save required entries and choose Mark ready. Ready or failed OAuth connections re-link in place with request_connection_link (reconnect: true when ready), keeping any published module and the serving grant. Ready typed connections renew in place with reconnect: true once they owe no Data Access key. MCP cards never auto-publish; use search_connector_tools/get_connector_tool/select_connector_tools to publish pending Requests. An Administrator publishes other ready cards without creating pending Requests; choose operations on the Requests page and review them. For Custom, use publish_module_version after allowing AI agent actions. Check describe_project for authority. Custom datasource's declared credentials supply the module's environment, including when bound to a card. Read describe_connector_programming for details; use connect_datasource for a database.
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>"
},
"name": "create_service_datasource"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mcp | No | Native MCP server or directory card only. Declare the HTTPS server URL (directory cards default to their endpoint), optional auth mode, header names and OAuth client metadata. Never include header values or secrets. Refused with credentials, no_credentials or top-level auth. OAuth availability and detection are decided by Request Service. | |
| auth | No | Custom only: OAuth sign-in on the hosted credential page, with no pasted token. Declare the protected HTTPS resource; scopes are optional, and omitted or empty scopes take the scopes of the operator's allowlist entry for the discovered authorization server, never this call's. Omit auth on update to preserve the stored declaration: an OAuth declaration is replaced whole and never removed. | |
| name | Yes | What this datasource is called on the Datasources page; unique in the project | |
| label | No | Custom only: what the credential page calls the service, e.g. "ISS tracker" or "Stripe (test mode)". update_service_datasource keeps the title the datasource already carries when this is omitted; send it to change the title, blank included to clear it | |
| provider | No | "custom" (default) or a catalogue connector id from list_service_providers | |
| credentials | No | Custom only: what the page asks for, one object per credential — name (the environment variable the connector reads, e.g. STRIPE_API_KEY), label (what the page calls it), secret (stored write-only; true for keys and tokens), required (the page cannot be marked ready without it), help (where the person finds it). Names only, never a value. | |
| data_access | No | Create a Data Access Point owned by this connection with zero initial grants. An administrator grants approved Requests; its key is delivered to the connector's own code and never returned here. A script a person runs needs a Data Access Point a person creates. | |
| 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. | |
| no_credentials | No | Custom only: the service needs no credential at all (a public feed); the page then asks for nothing | |
| credential_mode | No | Each person brings their own credentials (per_user, the default). An administrator shares their account from the datasource page. |