Skip to main content
Glama

Test datasource connection

test_connection

Test whether a stored datasource connection is still working (e.g. the OAuth token is valid). Records the outcome on the connection, so its status reflects this test.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auth_idYesConnection id — the `id` of a row from connected_datasources
datasource_idYesDatasource alias of that connection (from datasources)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoThe test outcome — whether the connection still authenticates, and the vendor's error when it does not. The result is written back onto the connection's status.
successYesTrue when the call succeeded. A failure comes back as an error result instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "description": "The test outcome — whether the connection still authenticates, and the vendor's error when it does not. The result is written back onto the connection's status."
      +    },
      +    "success": {
      +      "description": "True when the call succeeded. A failure comes back as an error result instead.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false and destructiveHint=false, but the description adds the key behavioral detail that the outcome is recorded on the connection, mutating its status. This goes beyond what the annotations alone convey. The description does not contradict the annotations; recording a test result is non-destructive and aligns with readOnlyHint=false. It lacks deeper details like network behavior or failure handling, but the provided side-effect context is valuable.

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

Conciseness5/5

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

The description is two concise sentences that front-load the purpose and then disclose the side-effect. No redundant phrases or filler words; every part earns its place. It is compact while still covering both the primary function and an important behavioral consequence.

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?

With only two required parameters, no nested objects, high schema coverage, and an output schema present, the description is sufficiently complete. It explains the core action and the status-recording side-effect, but does not explicitly state what happens on failure (e.g., return vs. status update) – though the output schema likely covers response details. Overall, nothing critical is missing for a simple test operation.

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

Parameters3/5

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

Schema description coverage is 100%, so both auth_id and datasource_id already have meaningful descriptions linking them to connected_datasources and datasources. The tool description does not add further parameter-specific meaning beyond what the schema provides. Baseline 3 is appropriate since the schema carries the explanatory burden and the description adds no extra parameter semantics.

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 description uses a specific verb ('test') and resource ('stored datasource connection'), and adds an example use case (OAuth token validity). It clearly distinguishes itself from siblings like test_automation and describe_datasource by focusing on connection status testing. The side-effect of recording the outcome is also stated, making the purpose unambiguous.

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

Usage Guidelines3/5

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

The description implies when to use the tool (when you need to verify a connection) but does not explicitly contrast it with alternatives. It gives a concrete example (OAuth token validity) but lacks explicit 'when not to use' guidance or references to sibling tools like connected_datasources or test_automation. Usage context exists but is implied rather than stated.

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