Skip to main content
Glama

Declare a database datasource

connect_datasource

Declare 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

NameRequiredDescriptionDefault
nameYesUnique datasource name shown in the project
typeYesRegistered database adapter type, such as postgres; use create_service_datasource for api
providerNoOptional provider variant from the datasource type catalogue, such as neon
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare the generic mutation profile (readOnly=false, destructive=false, idempotent=false, openWorld=true); the description adds real value with authorization requirements and the fact that credentials never transit the conversation. It also discloses refusal behavior for an invalid provider. It stops short of covering duplicate-creation risk, which is left to the schema's setup_step_id text.

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

Conciseness4/5

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

Four sentences, front-loaded with the action and the credential boundary before the access constraints and error note. The clause 'the credential is entered in the linked pane and never passes through this conversation' restates the opening sentence's hand-off idea, which is mild redundancy, but overall there is little wasted text.

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

Completeness4/5

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

For a non-destructive, non-idempotent creation tool with no output schema, the description covers authorization, the credential boundary, and the primary refusal case. The one gap is what a successful call actually returns (a link to the pane? a datasource record?) beyond the statement that no credential values come back.

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 genuine semantic detail beyond the schema: no credential or connection fields exist at all, and an invalid provider triggers an invalid_parameters refusal whose payload enumerates known_providers. That error-shape knowledge materially changes how an agent should choose the provider value.

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

Purpose4/5

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

The description uses a specific verb plus resource ('Declare a database datasource') and immediately bounds the scope by stating it hands credential entry to a person via a linked Setup pane. It implicitly separates itself from credential-writing tools by saying no credential or connection fields are accepted or returned. It does not explicitly name a sibling alternative, so a 4 rather than a 5.

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

Usage Guidelines4/5

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

It gives concrete preconditions: Administrator-only and requiring the project's datasource-management grant. The flow ('declare, then hand the Setup pane to a person') tells an agent the intended context, but there is no explicit 'use X instead when...' routing to alternatives such as create_service_datasource beyond the mention buried in the schema.

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