Skip to main content
Glama

add_connection

Save a named PostgreSQL or MySQL connection globally or in the project config, with optional SSH tunnel, SSL settings, and read-only mode for safe agent access.

Instructions

Add a named postgres/mysql connection. scope "global" (default) saves it to the user store; "project" saves it to .dbmole.json in the project root. Supports an optional ssh tunnel and a readonly flag. Optional ssl: true or { rejectUnauthorized, ca } (ca = PEM or file path).

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>",
      "host": "<host>",
      "user": "<user>",
      "type": "<type>"
    },
    "name": "add_connection"
  }
}

Input Schema

NameRequiredDescriptionDefault
sshNo
sslNo
hostYes
nameYes
portNo
typeYes
userYes
scopeNoglobal
databaseNo
passwordNo
readonlyNo
queryTimeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description discloses important behavior: global scope saves to the user store, project scope saves to .dbmole.json, and SSH tunneling, readonly, and SSL are supported. However, it omits overwrite/name-conflict behavior, credential storage or security handling, permissions, and whether the connection is tested after creation.

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 description is front-loaded and compact, moving from the core action to scope, optional SSH/readonly, and SSL details. It is dense but largely free of filler.

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

Completeness2/5

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

This is a complex 12-parameter mutation tool with no annotations, no output schema, and no schema parameter descriptions. The description covers only a subset of the parameters and omits important context such as existing-name behavior, credential handling, and most connection-field meanings.

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

Parameters2/5

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

Schema description coverage is 0% across 12 parameters. The description usefully explains scope persistence, optional SSH, readonly, and SSL ca/rejectUnauthorized semantics, but it leaves name, host, user, type, password, database, port, and queryTimeoutMs undocumented in both the schema and description.

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 states a specific verb and resource: "Add a named postgres/mysql connection." This clearly distinguishes creation from sibling operations such as update_connection, remove_connection, test_connection, and list_connections.

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?

It implies use when creating a new connection and explains the scope choice, but it does not explicitly say when to use update_connection instead or what happens when adding a connection name that already exists.

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