Skip to main content
Glama

Create a service datasource

create_service_datasource

Create 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

NameRequiredDescriptionDefault
mcpNoNative 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.
authNoCustom 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.
nameYesWhat this datasource is called on the Datasources page; unique in the project
labelNoCustom 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
providerNo"custom" (default) or a catalogue connector id from list_service_providers
credentialsNoCustom 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_accessNoCreate 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_idNoOptional 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_idNoOptional 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_credentialsNoCustom only: the service needs no credential at all (a public feed); the page then asks for nothing
credential_modeNoEach person brings their own credentials (per_user, the default). An administrator shares their account from the datasource page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses a great deal the annotations cannot: the credential page expires in one hour but reloading does not consume it, credentials never travel through the conversation, detection returns mcp.detected or a safe error plus a failed datasource_id, and the call requires Admin plus a datasource-management grant. It also states the return fields (datasource_id, configuring, human_link, declaration) despite no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the critical 'agree service, purpose and credentials' instruction are front-loaded, but the body degenerates into a dense run-on of edge cases — reconnect semantics, admin publishing, pending Requests, module environment binding — without paragraph or list structure. Most content earns its place, but the packing makes key rules easy to miss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter, nested-schema mutation with no output schema, the description covers every ambiguity an agent would hit: permissions, credential handling, error/retry behavior, the one-hour page window, what happens after detection, and how to finish or re-link. Global rules are deferred to describe_connector_programming and authority to describe_project, which is a reasonable boundary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real cross-parameter meaning the schema cannot express: the card-mode mapping (provider card vs Custom auth/credentials/no_credentials vs MCP card with mcp:{url,auth,headers,oauth}), and the mutual-exclusion rules between MCP, credentials, no_credentials and top-level auth. It stops short of explaining individual fields like data_access or setup_step_id, which the schema already handles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource pair — 'Create a service datasource and hosted credential page' — and immediately routes elsewhere for the nearest sibling ('use connect_datasource for a database'), so it is not confused with connect_datasource or update_service_datasource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit prerequisite sequence ('Read list_service_providers first; agree service, purpose and credentials'), explicit exclusions ('Do not combine MCP with credentials/no_credentials/top-level auth'), and explicit alternatives for other goals (connect_datasource for databases, request_connection_link for re-linking, publish_module_version for publishing). An agent knows both when to call this and when not to.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources