Update a service datasource
update_service_datasourceReplace a Custom or MCP service datasource's declaration while its status is configuring, failed or selected, and mint a fresh credential page. Send the complete credentials declaration (name, label, help, required, secret), auth for OAuth sign-in, or no_credentials: true for a public service. Custom OAuth auth is {type: "oauth2", resource: "", scopes: ["platform:read"]}. Omitted scopes — and an empty array, which Admin omits the same way — take the scopes of the operator's allowlist entry for the discovered authorization server: the scopes actually requested are that entry's, never this call's. Omitted auth preserves the stored declaration, and an OAuth declaration is never removed from a datasource: auth is replaced whole, there is no clear, and no_credentials or credentials cannot be combined with auth — a datasource that has signed in once keeps signing in. An auth re-sent with scopes that differ from the stored ones, including an auth that omits scopes the datasource has stored, is a changed declaration: it creates a new connection instead of re-linking. A failed OAuth connection with an unchanged declaration re-links in place; changing auth, label or credentials creates a new connection. The Administrator must sign in on the hosted credential page, with no pasted token; OAuth becomes ready only after sign-in completes. Preserves the datasource and Setup steps. For an MCP datasource send the complete mcp declaration instead, including the unchanged mcp.oauth object if used; directory URLs default from the card. Never mix it with credentials, no_credentials or top-level auth. MCP detection and Test and finish govern readiness. Refuses other catalogue cards and databases. An omitted label keeps the title the datasource already carries; send label to change it. Refuses with connector_republish_required once a connector is bound to the datasource - even while it is settling failed - because that connector's manifest reads the credential names it was published with, and publish_module_version is what moves both; a connected datasource is refused with already_connected. The answer carries human_link; the credential never passes through this conversation. Requires the project's datasource-management grant and an Administrator caller.
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": {
"datasource_id": "<datasource_id>"
},
"name": "update_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. | |
| 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 | |
| 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. | |
| datasource_id | Yes | The Custom or MCP service datasource UUID | |
| 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 |