Skip to main content
Glama
shibbirweb

mcp-db-read-only

by shibbirweb

Connect to Database

connect
Idempotent

Establish a runtime database connection using a connection URL, supporting MySQL, PostgreSQL, SQLite, and more. Save the connection under an alias for later use in the session.

Instructions

Connect to a database at runtime with a connection URL (mysql, mariadb, postgres, sqlite, mssql, clickhouse, mongodb, redis, elasticsearch, opensearch). Not persisted to disk, but kept for the rest of the session under an alias

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesConnection URL, e.g. postgres://user@host:5432/db, mongodb://user@host/db, redis://host:6379/0, sqlite:///path/to/file.db. Use host.docker.internal for a database on this machine when running in Docker
aliasNoName to remember this connection under for use_connection later
passwordNoPassword, if not in the URL. Avoids percent-encoding special characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the description correctly reflects these (no contradiction). The description adds value by specifying that the connection is session-scoped and not persisted to disk, which is a key behavioral trait beyond the annotations.

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 sentences, front-loading the core purpose and scoping, and then adding a practical note about the alias. Every word earns its place; no fluff.

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?

Given the tool's moderate complexity (3 params, all schema-described, no output schema), the description covers the purpose, usage, and key behavioral nuances. The agent has enough information to invoke it correctly without additional context.

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 schema already documents all parameters. The description adds context about using the alias with use_connection later, and the password parameter avoids percent-encoding issues, which is not in the schema but is helpful.

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?

States a specific verb ('connect') and a resource ('database'), with a list of supported database types and how the connection is scoped (session-only, under an alias). This clearly distinguishes it from later operations and covers the full scope.

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?

The description clearly sets context: it's a runtime connection that is not persisted, and can be used later via an alias. It doesn't explicitly mention when to prefer this over sibling tools, but given that the siblings are separate actions, a 4 is appropriate.

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