Skip to main content
Glama

Test a connection

test_connection
Read-only

Tests one of a project's saved connections now, by asking the service the same cheapest "does this sign-in work" question CodeGene's own checks ask; nothing is sent, written or changed at the service. Answers works: true with the account it signed in as, or works: false with the problem and, when a database could not be reached (an allow list, a private address, a closed port, a wrong address), guide: what happened, why, and the steps for that database's host, simplest first. Read the guide's options to the person in its own words. A guide that offers a private network can be followed with add_private_network. A sign-in the service refuses is recorded on the connection, as any use of it would be.

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": {
      "project_id": "<project_id>",
      "connection_id": "<connection_id>"
    },
    "name": "test_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
project_idYesThe project (list_projects gives ids).
workspace_idNoWorkspace id from whoami; omit when there is one.
connection_idYesThe connection (list_connections gives ids).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations: it discloses the exact success/failure response shape (works: true/false with the signed-in account or the problem plus a `guide`), the classes of network failures covered, and the non-obvious side effect that a refused sign-in is recorded on the connection. It also instructs how to relay guide options to the user. There is mild tension with readOnlyHint=true over the recorded refusal, but the description discloses that side effect rather than hiding it, so it is not a contradiction.

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?

The lead sentence front-loads what the tool does and the safety claim. Later clauses get dense and nested (the parenthetical failure list, the guide instructions, the recorded-refusal note), which slows parsing, but each clause carries real information rather than filler.

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?

With no output schema, the description still spells out the return shape, the failure payload, and the actionable follow-up, which is what an agent needs to act on results. Safety is covered by annotations and the explicit "nothing is sent, written or changed" claim, plus the disclosed exception.

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 project_id, connection_id and workspace_id are already documented in the schema, including the whoami/list_connections pointers. The description adds only relational framing (a connection belongs to a project) and no format or edge-case detail beyond the schema — baseline 3.

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?

Specific verb plus resource with scope: "Tests one of a project's saved connections now," then qualifies exactly which question it asks ("the same cheapest 'does this sign-in work' question CodeGene's own checks ask"). That phrase alone separates it from a deeper setup check and from read paths like read_from_connection.

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?

Gives clear operating context: run it now against an existing saved connection, and when it fails, follow the returned guide, potentially with add_private_network — an explicit next-step alternative. It stops short of naming an explicit counterpart (e.g. check_connection_setup) or stating when not to run it, so it is clear but not fully disambiguating.

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