Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
--urlNoConnect to this database URL instead of the config's dbCredentials.
--configNoThe Drizzle config file path (default: drizzle.config.ts in the current folder). Required for clients that don't start servers in your project folder, such as Claude Desktop.
--driverNoThe database driver to use: pg, postgres, pglite, better-sqlite3 or libsql (default: the one installed).
--redactNoHide columns whose names match this regex (default: password, secret, token, apiKey…).
--timeoutNoStatement time limit in milliseconds (default: 15000).
--max-rowsNoThe most rows a tool returns (default: 100).
--max-textNoCut strings longer than this (default: 500).
--allow-writesNoAdd the execute tool, which allows changing data. Writes are opt-in; without this flag the server is read-only.
--show-secretsNoDon't hide any columns.

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 shows the project's database through its Drizzle schema, like Drizzle Studio.

Start with schema to see the tables, then schema with a table for its columns and relations. Tables and columns can be named by their TypeScript key (createdAt) or SQL name (created_at); results use TypeScript keys, as db.query does.

Use browse to read rows with filters, sorting and related rows, count for totals and breakdowns, and query for any SELECT. drift compares the schema with the database and migrations lists pending migrations.

Everything runs in read-only transactions unless the server was started with --allow-writes. Values in columns that look like secrets are hidden, and results are capped.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
schemaA

Lists the tables in the Drizzle schema with their TypeScript and SQL names, or with table, describes one: columns with types, nullability and defaults, keys, indexes, checks and relations.

browseA

Reads rows from a table, like Drizzle Studio: pick columns, filter, sort, page, and include related rows through the schema's relations. Returns rows keyed by TypeScript property, plus the total matching.

countA

Counts the rows in a table that match a filter. With groupBy, counts per distinct value, largest groups first: a quick way to see how data is distributed.

queryA

Runs one SQL statement in a read-only transaction and returns up to 100 rows. Use $1, $2 (Postgres) or ? (SQLite) with params for values. SQL uses table and column SQL names, not TypeScript keys.

explainA

Shows the plan the database would use for a query, to check that indexes are used. With analyze on Postgres, runs the query (read-only) and reports real timings.

driftA

Compares the Drizzle schema with the live database: tables and columns on one side only, and columns whose type or nullability differ. Use it when queries fail on columns the code expects, or after changing the schema.

migrationsA

Lists the migrations drizzle-kit generated, and whether each has been applied to the database, is pending, or was edited after it was applied.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
schemaEvery table in the schema, with its columns and relations.

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

Each tool has a distinct primary role: schema introspection, row browsing, counting, raw SQL, query plans, migration status, and schema drift. There is some overlap between browse and query for reading data, and between schema and drift for schema information, but the descriptions make the intended use cases clear.

Naming Consistency4/5

All tool names are single lowercase words with no camelCase/snake_case mixing, so the set is visually consistent. However, the names mix verbs (browse, count, query, explain) and nouns (schema, migrations, drift), so the convention is readable but not perfectly uniform.

Tool Count5/5

Seven tools is well-scoped for a database/schema inspection server. Each tool covers a distinct inspection workflow without obvious redundancy.

Completeness4/5

The surface covers schema inspection, data browsing, counting, raw querying, query planning, migration status, and drift detection, which is strong for a read-only inspection server. Minor gaps might include applying migrations or richer migration details, but those may be intentionally out of scope.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues