Skip to main content
Glama
mcp-readonly-db

mcp-readonly-db

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MCP_DB_PATHNoThe SQLite file to expose. Relative paths depend on where the app was launched from, so use absolute paths in the Claude config../data/shop.db
MCP_MAX_ROWSNoMost rows any single answer may contain. Maximum is 1000.200
MCP_AUDIT_LOGNoWhere every request is recorded../logs/audit.log
MCP_QUERY_TIMEOUT_MSNoA query running longer than this is stopped.5000

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_tablesA

List every table and view in the database with its row count. Start here.

describe_tableB

Show a table's columns (name, type, nullability, primary key), foreign keys and row count.

sample_rowsA

Return the first few rows of a table so you can see what the data looks like.

run_queryA

Run ONE read-only SQLite SELECT statement (WITH ... SELECT is fine). Writes, PRAGMA, ATTACH, comments and multiple statements are rejected. Use ? placeholders with the params array instead of pasting values into SQL. Results are capped at a row limit and queries are time-limited.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool occupies a clear niche in a database exploration workflow: list_tables for discovery, describe_table for schema, sample_rows for quick previews, and run_query for ad-hoc SQL. sample_rows could technically be done via run_query, but the descriptions make the intended progression unambiguous and the guardrails differ.

Naming Consistency5/5

All four tools follow a consistent snake_case verb_noun pattern (list_tables, describe_table, sample_rows, run_query). No mixed conventions or vague names.

Tool Count5/5

Four tools is well-scoped for a read-only database explorer: enough to cover discovery, schema inspection, previewing, and querying without redundancy. Every tool earns its place.

Completeness4/5

The surface covers the full read-only lifecycle from table discovery through querying, with no dead ends for the stated purpose. Minor gaps like listing indexes/views separately or EXPLAIN support exist but agents can work around them via run_query or describe_table.