Skip to main content
Glama

Read a service datasource's connection

get_datasource_connection
Idempotent

Read what a service datasource's credential page holds, by name and never by value: its status, the credentials it declared with present true, false, or null where this read could not list the names at all — a per-user connection's own values, or a shared connection whose listing failed right now (credential_presence is then "unknown" and missing_required does not name them), any names present that were not declared, and what happens next. credential_mode and credential_mode_basis say how its credential is held — per_user, or shared with every user — and shared_approved_by and shared_approved_at are null unless an Administrator approved the sharing; shared_approved_by is also null unless you are an Administrator. Use it to tell the person which credentials the page still lacks, or to learn that setup completed. For Custom OAuth connections, auth echoes the resource and optional scopes; authorization_server is null until discovery. The Administrator must sign in on the hosted credential page, with no pasted token. Ready or failed OAuth connections re-link in place through request_connection_link (reconnect: true when ready), keeping any published module and the serving grant until sign-in succeeds. For a catalogue card, an Administrator's read that finds it connected with nothing bound is also the read that publishes the card's connector without creating pending Requests. The answer's connector block reports the version bound; choose operations on the Requests page, then review and approve the chosen Requests. That read can therefore take up to about a minute; if your client times out, read again rather than giving up, because the publish carries on without you and a later read finds the version bound. A custom datasource is ready for publish_module_version instead. "Let your AI agent build and test this connection" starts on; describe_project reports when it is off, and publishing or trial runs are refused with datasource_artifact_authority_not_granted until an Administrator turns it on in this datasource's Setup step.

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": "get_datasource_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
datasource_idYesThe service datasource (UUID)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Despite the read framing, the description discloses important non-obvious behavior beyond the annotations: a catalogue-card read can publish a connector, the call can take about a minute, and a client timeout should be retried because publishing continues. It also covers Administrator-only approval fields and the datasource_artifact_authority_not_granted refusal path.

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 core purpose is front-loaded, but the definition is a dense, run-on block of edge cases and side effects that is difficult to parse. It is informative rather than wasteful, yet the structure and length are not concise.

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?

There is no output schema, so the description carries the full burden of explaining returned fields like credential_presence, credential_mode, approval timestamps, and connector version binding. It also covers retry behavior, publish side effects, and permission constraints, making it complete for a complex single-parameter read.

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

Parameters5/5

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

With only one parameter and full schema description coverage, the schema already documents datasource_id as the service datasource UUID. The description does not add further syntax or format details, so the high schema coverage makes a 3 the appropriate baseline score.

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 states a specific verb and resource: reading a service datasource's credential-page state by name, not value. It also distinguishes the read from sibling actions such as request_connection_link for re-linking and publish_module_version for custom datasource publishing.

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?

The description gives concrete use cases: telling a person which credentials are still missing, or learning that setup completed. It also routes the agent away from this tool where siblings are appropriate, explicitly naming request_connection_link for OAuth re-linking and publish_module_version for custom datasources.

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