Skip to main content
Glama
database-mcp

database-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DBMCP_MAX_LIMITNoHard cap on limit, regardless of what's requested.1000
DBMCP_TIMEOUT_MSNoStatement timeout for every query, in milliseconds.15000
DBMCP_PREVIEW_ROWSNoRows returned by run_query when preview: true is set.5
DBMCP_DEFAULT_LIMITNoRows returned by run_query when no limit is given.100
DBMCP_SCHEMA_CACHE_TTL_MSNoHow long get_schema results are cached per connection, in milliseconds.300000

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_connectionsA

List the configured database connections (name, engine, description). Call this first to discover what databases are available. Never returns credentials.

get_schemaA

Get a compact overview of an entire database in one call: all tables, their columns, and foreign-key relationships. PREFER THIS as your first call after picking a connection — it is cached and token-efficient. Only use describe_table to zoom into one table when this overview is too large.

list_tablesB

List tables and views in a database (optionally filtered by schema).

describe_tableA

Full detail for one table: columns (name, type, nullable, default, primary key), foreign keys, and indexes. Use when get_schema's overview isn't enough.

explain_queryA

Dry-run a SQL query: returns the query plan (EXPLAIN — nothing is executed) plus warnings (missing LIMIT, sequential scans). Use to verify a query is valid and sane before run_query on anything expensive.

run_queryA

Execute a READ-ONLY SQL query (SELECT/CTE/SHOW/DESCRIBE/EXPLAIN only — writes are rejected at multiple layers). Returns columns, rows, row_count, truncated flag, and a ready-to-display markdown_table. Set preview=true to sanity-check a few rows before a full run. An automatic LIMIT is applied to unbounded SELECTs.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation4/5

Most tools are clearly distinct by resource and action, especially explain_query vs run_query and list_connections vs schema inspection. The main overlap is list_tables vs get_schema, but the descriptions explicitly guide when to use each.

Naming Consistency4/5

All names use snake_case with a verb_noun structure: list_tables, describe_table, explain_query, run_query, list_connections, get_schema. The verbs vary slightly (list/describe/get), but the pattern remains predictable and readable.

Tool Count5/5

Six tools are well-scoped for a read-only database exploration server. Each tool has a clear role in connection discovery, schema inspection, query validation, and query execution.

Completeness4/5

The tool surface covers the core read-only workflow: discover connections, inspect schemas/tables, validate queries, and execute queries safely. Write operations are intentionally excluded, so coverage is strong for the stated scope, with only minor gaps like schema-wide search.

Maintenance

ActivityNo data
ResponsivenessOutdated data