Skip to main content
Glama
nandanosql

database-explorer-mcp

by nandanosql

connect_database

Connect to PostgreSQL, MySQL, SQLite, or MongoDB and return a connection alias for subsequent queries.

Instructions

Connect to a database (PostgreSQL, MySQL, SQLite, or MongoDB). Returns the connection alias for use in subsequent queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoDatabase host (default: localhost)
portNoDatabase port
typeYesDatabase type
userNoUsername
aliasNoConnection alias (default: 'default')
databaseNoDatabase name
filepathNoFile path for SQLite databases
passwordNoPassword
connectionStringNoFull connection URI (overrides individual fields)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden, and it only discloses that an alias is returned. It says nothing about credential handling, whether connecting under an existing alias overwrites it, connection persistence/lifetime, or what happens on auth failure — all material for a tool that takes passwords and connection strings.

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?

Two short sentences, no filler, with the supported engines and the return value front-loaded. Every clause earns its place.

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

Completeness3/5

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

The lack of an output schema is partly offset because the description names the returned alias. However, for a 9-parameter connection tool handling credentials and multiple engines, it omits connection lifecycle and error behavior, leaving gaps an agent would want filled.

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% and every parameter including defaults and the connectionString override behavior is documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

States a specific verb and resource (connect to a database) and enumerates the supported engines, so an agent can tell it apart from run_query or list_connections. It does not explicitly contrast itself with sibling tools like disconnect_database, but the purpose is unmistakable.

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 phrase 'for use in subsequent queries' implies this is a prerequisite step before run_query, but the description never states when to use this versus list_connections or how to handle an already-established connection. Usage is implied rather than specified.

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