Skip to main content
Glama
LiteDB desktop

LiteDB desktop

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LITEDB_POLICYNoread-only (the default for these variables), guarded or unrestricted.
LITEDB_SQLITE_PATHNoPath to a SQLite file. Leave both unset to follow the database open in the LiteDB desktop app.
LITEDB_DATABASE_URLNopostgres://, mysql:// or mariadb:// connection string.

Instructions

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

Talks to the database currently open in the LiteDB desktop app, or to LITEDB_SQLITE_PATH / LITEDB_DATABASE_URL if those are set. Switch database or policy in the app and the next tool call follows, no restart. Quitting the app clears the handoff. If the app is in YOLO, this server maps that down to guarded. SQLite is the file on disk, not unsaved editor state, save first. Start with list_tables and describe_table, describe_table reports the values a low-cardinality column actually holds, which is usually the difference between a query that runs and one that is right. Writes are previewed; running them is a separate execute_approved call. Where the person has allowed it for a connection, the write tool runs a small bounded write in one call instead, and returns anything else as a preview.

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
list_tablesA

Every table in the database, with its column count, approximate row count and primary key. The place to start.

describe_tableA

Columns and types for one table, with primary keys, NOT NULL, defaults, foreign keys, indexes, and, for low-cardinality text columns, the distinct values they actually contain. Read this before writing SQL against a table you have not seen.

queryA

Run SQL against the database. A read executes and returns rows. Anything that would change the database does NOT execute: it comes back classified, with the number of rows it would affect and the query plan, plus a single-use token for execute_approved. A statement the policy forbids is refused and says why.

execute_approvedA

Second step, after query. Runs the statements a previous query call previewed. Takes only the token, the SQL is held server-side, so what runs is exactly what was previewed. Single-use, and expires five minutes after the preview. Confirm the row count with the person you are working for before calling this. While LiteDB is open, the request appears in its window and nothing runs until they approve it there: a call can come back WAITING, and then you call again with the same token once they have answered.

writeA

Run a write in one call, where the person has allowed that for this connection in LiteDB (Settings → Agents): an INSERT of listed rows, or an UPDATE or DELETE with a WHERE clause, that changes no more rows than the limit they set. The limit is checked before it runs and enforced while it runs. Anything else, or any write when it is not allowed, comes back as a preview with a token for execute_approved, exactly as from query, with the reason it did not run.

list_vector_columnsA

Vector columns in the database and their dimensions. PostgreSQL with the pgvector extension only.

semantic_searchA

Nearest-neighbour search over a pgvector column. Give text to search by meaning, it is embedded by a model running on this machine, so the text never leaves it, or row_id to find rows similar to an existing one. The first text search downloads the embedding model (~23 MB for the default) and may take a minute.

audit_logA

The most recent statements recorded against this database, newest first , from this server and from the LiteDB desktop app, which share the file. Shows what was proposed, what was approved, and what ran.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
schemaEvery table and column in the database, as one document. Cheaper than calling describe_table for each table when you need the whole picture.

TDQS

A4.1/5.0

Scored across 8 tools

Disambiguation4/5

Each tool has a stated role, and the descriptions explicitly delimit the tricky boundaries: query previews writes, write only runs them when pre-authorised, and execute_approved runs them by token. The residual overlap is real (query and write can both end up producing the same preview/token, and semantic_search is a specialised query), but the documentation resolves it well enough that an agent should pick correctly.

Naming Consistency4/5

All names are snake_case and mostly follow a verb_noun shape (describe_table, list_tables, list_vector_columns, audit_log, execute_approved). The minor deviations are the bare verbs `query` and `write` and the noun-first `audit_log`, which are readable but not strictly parallel.

Tool Count5/5

Eight tools is well within a healthy range and each one maps to a distinct step in the read/write/approve workflow plus schema inspection, auditing and vector search. Nothing looks redundant or bolted on.

Completeness4/5

The surface covers schema discovery, reads, guarded writes with an approval lifecycle, and an audit trail, which is essentially full lifecycle for a desktop DB agent. Gaps are minor but present: no way to cancel or revoke a pending token, no transaction/connection controls, and no explicit index or DDL guidance beyond describe_table's output.

Maintenance

ActivityActive
ResponsivenessLimited data