Skip to main content
Glama

dbprint

PyPI Docs License: Apache 2.0 Status M8ven Score

Write down once what your database means, next to your code, and every agent session reads it.

Your coding agent reads your migrations and your models, so it gets the shape of your database right. What it gets wrong is everything the shape does not say: that revenue_cents is gross and every report uses the net column, that status is spelled two ways, that orders joins shipments one-to-many more often than anyone expects, that legacy_uid has been dead since the migration. A colleague would tell it in thirty seconds. Without a database connection the agent cannot find out. With one, it rediscovers the same facts live, every session — queries that cost your warehouse time and budget and cost the agent tokens — and can still read them wrong: a count does not say that a code is dead or that a column is gross.

dbprint turns that knowledge into plain text committed in your repository:

  • It measures the database once. Each table's DDL, its joins — declared, and inferred where the schema declares none — and per-column statistics: null shares, complete value lists with every spelling, ranges, distributions, value shapes and more. On any of eight engines.

  • An agent writes down what the numbers mean. dbprint annotate hands an agent one table's measurements and the questions they leave open — what a code means, what a sentinel date stands for, which rows a report leaves out — and the agent answers them from your code and read-only queries, into files dbprint never overwrites. dbprint annotate --check flags a note the data contradicts.

  • Every later session reads it offline. Through an MCP server, a packaged skill or dbprint context, with no database connection and no credentials at the agent. Because it is text in git, a schema or data change shows up in review, and dbprint check gates it in CI.

With dbprint, agents get more answers right, for less. In our tests across multiple codebases, coding agents reading an annotated print got 80% fewer answers wrong than without one, at 17% lower cost per correct answer — and 90% fewer on questions whose catch only the print stated.

What your agent reads

An excerpt of dbprint context --purpose query on a table from the reference print in this repo — the fragment an agent gets before it writes SQL:

# Table: arboretum.seedbank.germination_trial  (900 rows, 8 columns)

## Joins
- accession_id -> arboretum.seedbank.accession.accession_id (declared)
- collector_id -> arboretum.seedbank.collector.collector_id (inferred)

## Data dictionary

One row per germination attempt run against a batch drawn from an accession.

## Column values

| Column | Values (count) | Coverage | Nulls |
|---|---|---|---|
| medium | 'moist filter paper' (176), 'sterile grit' (176), 'vermiculite mix' (176), 'agar medium' (175), 'sand tray' (176) {'sand tray' (151), 'Sand Tray' (25)}, 'control' (21) = 'No growth medium: a no-treatment control group, its germinated_count compared against ambient conditions rather than a physical medium.' | 100% - the list is the whole domain |  |

Three things here no migration states: medium holds exactly these values and no others, sand tray is stored in two spellings, so a filter on one misses 25 rows, and control is not a medium at all. The first two dbprint measured; the third a human or an agent wrote down once, and every session after it reads.

Run it yourself, with no database and nothing to configure — only uv:

uvx dbprint context arboretum.seedbank.germination_trial --purpose query \
  --project https://github.com/jakubro/dbprint/blob/main/docs/format/v1/examples/production/.dbprint.yaml

Related MCP server: SQL MCP Server

Quickstart

Requires Python 3.13+. Install with the driver extra for your database:

uv tool install 'dbprint[postgres]'     # or [mysql], [snowflake], [duckdb], [clickhouse], [redshift], [databricks], [bigquery]

Add the [mcp], [docs] or [dbt] extras in the same install — uv tool install 'dbprint[postgres,mcp]' — since a later install replaces the earlier one rather than adding to it.

The Postgres adapter shells out to pg_dump for DDL, so the PostgreSQL client binaries must be on your PATH.

Scaffold a project in your repo root:

dbprint init

That writes .dbprint.yaml (commit it), creates prints/, and writes a credentials template to ~/.dbprint/connections.yaml — outside the repo, so secrets never sit next to the config.

Put your connection details in the credentials file:

# ~/.dbprint/connections.yaml
primary:
  host: localhost
  port: 5432
  database: my_db
  user: dbprint_ro
  password: change_me

and tell .dbprint.yaml which adapter to use and which tables to read:

# .dbprint.yaml
connections:
  primary:
    adapter: postgres
    auto: true
    tables:
      include:
        - "*.public.*"

Credentials resolve from DBPRINT_<CONNECTION>_<KEY> environment variables first, then ~/.dbprint/connections.yaml, then a project-root .env. Every key of both files is in docs/CONFIG.md.

Profile it:

dbprint generate

Commit the result alongside your code. Then inspect it with no database in reach:

dbprint list

Then have an agent annotate a table — the brief carries the annotation skill's steps, so any agent CLI can follow it:

dbprint annotate my_db.public.orders | claude -p

and connect your agent to the result.

What it does to your database

  • It reads. A role that can SELECT the tables you profile is enough; each engine's adapter page, linked from your first print, lists the exact grants. The one write is a temporary copy of a sampled table's drawn rows, gone when the session ends (on BigQuery, when its expiration passes), and only when you sample — read.tables.materialize turns it off.

  • It publishes real values. Value lists, ranges and percentiles are cell values, and they land in your repository. Nothing is withheld by default: redaction masks, drops or hashes them by column name, by detected sensitivity (personal_name, national_id, ...) or by shape, keeping every count.

  • It costs one profiling run, then what you choose to re-run. A table is re-read when its print is older than its freshness threshold or its settings changed; sampling, row filters and catalog-only reads bound the cost on a warehouse — see choosing what to profile.

What a print looks like

Under the context an agent reads are plain YAML files. An excerpt of one table's statistics.yaml, some fields elided, from the same reference print:

row_count: 2500
columns:
  catalogue_url:
    sql_type: character varying(200)
    nullable: false
    null_rate: 0.0
    classification: text
    cardinality: 2500
    cardinality_ratio: 1.0
    inferred:
      looks_like: url
      sampled: 1000
      matched: 1000
      candidate_key: true
    values:
    - value: https://specimens.example.org/accession/1
      count: 1
    - value: https://specimens.example.org/accession/10
      count: 1
    # ... 28 more
    values_coverage: 0.012      # top 30 of 2500 - a value list, not a claim of completeness
    distribution: long_tail

  provenance_country:
    sql_type: character(2)
    classification: categorical
    cardinality: 10
    inferred:
      looks_like: country_code
      sampled: 10
      matched: 10
    values:
    - value: AU
      count: 250
    - value: CA
      count: 250
    - value: DE
      count: 250
    - value: FR
      count: 250
    - value: GB
      count: 250
    # ... 5 more
    values_coverage: 1.0        # the list is the whole domain, not a sample
    distribution: uniform

  received_at:
    sql_type: timestamp(0) with time zone
    classification: temporal
    range:
      min: '2018-01-08T00:00:00Z'
      max: '2024-11-28T00:00:00Z'
      span_days: 2516
    percentiles:
      p01: '2018-02-09T00:00:00Z'
      p25: '2019-10-02T00:00:00Z'
      p50: '2021-06-19T00:00:00Z'
      p75: '2023-03-05T00:00:00Z'
      p99: '2024-10-25T00:00:00Z'

values_coverage: 1.0 is the load-bearing field: those ten values are the entire domain, not the top ten. An eleventh value can be ruled out without asking the database. (When a table is profiled from a sample rather than in full, coverage is measured over the rows that were actually read — see Scoped profiling below.)

inferred is what dbprint concluded rather than read: looks_like: country_code is a verdict, and sampled/matched are the evidence for it, so a shape confirmed by ten values never looks like one confirmed by ten thousand.

Alongside it, relationships.yaml carries the join graph:

refers_to:
- column:
  - collector_id
  target_table: arboretum.seedbank.collector
  target_column:
  - collector_id
  on_delete: RESTRICT
  detection: declared      # or `inferred`, when dbprint guessed the edge from naming
  observed:
    fanout_avg: 6.25
    target_coverage: 1.0

That half is measured. The other half you write, in the same directory, in the same commit — statistics.annotations.yaml for a column:

columns:
  collector_id:
    note: >-
      FK to collector.collector_id. Field collectors are affiliated with a
      partner institution; collector.institution names it.

and description.md for table-level narrative that no statistic can express.

dbprint never writes to either file, and both are read alongside the statistics — but on anything the statistics can answer, the statistics win; the narrative is authoritative only on what a number can't.

What lands in your repo

prints/<connection>/
  manifest.yaml                    # inventory, freshness, per-table thresholds
  reading.md                       # generated guide - how to read the rest of the print
  diff.yaml                        # machine-readable drift from the last run
  manifest.annotations.yaml        # optional, connection-level notes you write
  <schema>/<table>/
    ddl.sql                        # native DDL, normalized for stable diffs
    statistics.yaml                # column distributions
    relationships.yaml             # declared + inferred foreign keys
    description.md                 # optional, you write it
    statistics.annotations.yaml    # optional, per-column notes you write
    relationships.annotations.yaml # optional, per-edge notes you write

reading.md is written fresh on every run: it teaches a consumer which fields to trust for what, so a print explains itself to an agent that has never seen the format.

The four .md / .annotations.yaml files are yours — dbprint never overwrites them, and all four are folded into what agents read.

Commands

Command

What it does

dbprint init

Scaffold .dbprint.yaml + prints/ + a credentials template

dbprint config explain

Print the profile one table resolves to, each value commented with the default, connection or rule that set it

dbprint generate

Profile the database; write the print and diff.yaml

dbprint list

Offline summary of the committed print

dbprint diff

Compare the live database against the committed print

dbprint check

CI gate: structure, freshness and statistic assertions; --online adds drift and SQL assertions

dbprint context

Emit a prompt-ready Markdown view of one or more tables

dbprint annotate

Print an authoring brief for one table's annotations, or --check them

dbprint docs

Browse the print as an HTML site — serve it live or build it static (the [docs] extra)

dbprint serve

Read-only MCP server over the committed print (the [mcp] extra)

Full reference: docs/CLI.md.

Connecting an agent

An MCP client launches the server itself, so it — not you — picks the working directory. Name the project explicitly:

{
  "mcpServers": {
    "dbprint": {
      "command": "uvx",
      "args": ["--from", "dbprint[mcp]", "dbprint", "serve", "--project", "/srv/analytics"]
    }
  }
}

The server reads the committed print and never connects to a database, so the client needs no credentials.

Reading a remote project

--project also accepts a git address, so a print committed to someone else's repository reads without cloning it by hand first:

dbprint list --project https://github.com/jakubro/dbprint/blob/main/docs/format/v1/examples/production/.dbprint.yaml
dbprint context arboretum.seedbank.accession --project https://github.com/jakubro/dbprint#main:docs/format/v1/examples/production

dbprint clones it for you and asks for no credentials of its own — your existing SSH agent or credential helper covers a private repository. It's read-only: commands that write or connect live to a database (generate, diff, check --online) refuse a remote locator; every other command works against it exactly as it does locally.

Beyond the basics

  • Semantic inference. Every column gets one of 8 classifications. Text, categorical and foreign-key columns get one of 38 shape patterns (uuid, email, phone, ip, country_code, ...), published with the sample size and match count behind the verdict. Columns that hold data that must not leave the database get a sensitivity axis (personal_name, postal_address, national_id, credential, ...). Columns effectively unique (cardinality ratio >= 0.9999) are marked candidate_key, with a candidate_key_exception alongside whenever that threshold admits measured or estimated duplicates rather than true uniqueness. Foreign keys your schema never declared are inferred from naming and stamped detection: inferred.

  • Redaction. Withhold cell values with mask, drop, or hash (salted), targeting columns by glob or by inferred sensitivity or by shape — so a personal_name column added next quarter is covered by a rule written today. Counts, cardinality and distributions survive intact; only literals are withheld. The salt lives with your credentials, never in the committed config.

  • Assertions. Write data-quality checks in YAML against any statistic, or as raw SQL. Statistic assertions are evaluated against the committed print by plain dbprint check, with no database in reach; SQL assertions need dbprint check --online. See docs/ASSERTIONS.md.

  • CI exit codes. 0 ok, 1 malformed print or unusable config, 2 stale, 3 drift, 4 connection failure, 5 partial run, 6 assertion failure, 7 total failure. diff, check and context all speak --format json|yaml.

  • Scoped profiling. Per-table rules can sample (seeded from the table name, where the engine supports seeding), apply a row filter, or change what's measured — gated on table size, so one rule covers every fact table you haven't named yet. A table read this way carries a scope block and a per-column rows_scanned, and every count in the file is denominated in the rows actually read, never silently in the whole table.

  • MCP server. dbprint serve exposes 7 tools — get_table_context, list_tables, search_columns, resolve_value, get_manifest, get_diff, get_reference — plus every artifact as a resource. It reads the committed print only and never opens a database connection. See docs/MCP.md.

  • Markdown skills. For clients that take markdown rules or custom instructions, a drop-in skill file tells an agent what a committed print answers, which tool answers it, and what each number covers — no process to run. A second skill has an agent write the annotation files from the code that writes each table and read-only queries, checked with dbprint annotate --check. Both sit at docs/examples/skill/ so you can read them before installing anything.

  • dbt lineage. Point a connection's dbt_manifest at a compiled dbt manifest.json and generate records each model column's source columns as derived_from, so a note written once on a source column reaches every model built from it (the [dbt] extra). See docs/CONFIG.md.

  • Token-budgeted context. dbprint context arboretum.seedbank.accession --budget 4000 fits the Markdown view into a token budget, dropping the lowest-priority sections first.

Closest neighbours

Project

What it does

How dbprint differs

dryrun

Offline Postgres schema snapshot + MCP server + linting

Nearest thing to this. Its snapshot is a compressed binary bundle you mark binary in .gitattributes; dbprint's artifact is line-diffable YAML with a published spec, across eight databases

dbt-profiler

Column profiles committed as dbt YAML / Markdown

dbt projects only. No DDL, no relationship graph, no semantic inference or redaction

Live-connection MCP servers (dbhub, postgres-mcp, Supabase, Neon)

Query and introspect a database at agent runtime

They need credentials at the agent, every session. dbprint profiles once, commits the result, and serves it with no database in reach

tbls, SchemaSpy

Schema documentation and ER diagrams for humans

Structure only, no data distributions. dbprint docs serve renders the same browsable pages and FK diagrams over a print's measured columns

What dbprint is not

  • Not a migration tool. It doesn't author, apply or version DDL changes. Use Alembic, Flyway, Liquibase, sqldef, Atlas.

  • Not a schema-management or ORM layer. A print is generated from your database; it is never the source of truth you build it from.

  • Not a live query interface. Nothing in a print executes SQL for your agent.

  • Not a data-quality platform. The assertion DSL is a CI gate over a print, not monitoring, alerting or lineage. Use Soda, Great Expectations, Elementary.

  • Not a data catalog. No hosted service, no shared search index, no business glossary. dbprint docs serves a local read-only view of a committed print, bound to loopback, with nothing to administer.

The format

A print is a portable, git-committed snapshot of a database's structure and column-level data distributions, consumable offline by humans, AI coding agents, and CI. The on-disk format — not the CLI — is the durable artifact here: specified, versioned independently of the tool, and designed for other producers to emit.

The format is specified in docs/format/v1/SPEC.md.

Seven JSON Schemas ship inside the installed package at src/dbprint/spec/v1/ — four for the generated artifacts, three for the annotation files you write — and the conformance validator is a public API with no database, config or CLI required:

from dbprint.conformance import validate_print

issues = validate_print("prints/production")  # conforms iff no error-severity issues

The reference print at docs/format/v1/examples/ is real dbprint output, not a hand-written illustration — what you read there is what you get.

Configuration

.dbprint.yaml holds project config (committed); ~/.dbprint/connections.yaml holds credentials (never committed). Every key of both, with types, defaults and resolution order, is in docs/CONFIG.md. Internals are documented in docs/ARCHITECTURE.md.

License

Copyright 2026 Jakub Roman. Distributed under the Apache License 2.0.

Available Tools

7 tools
get_diffA

Answer what changed between the database's last two prints: the recorded diff, whose summary counts every kind of change and whose changes list names each one - tables and columns added, removed or retyped, relationships changed, statistics that drifted. A statistic with no drift event did not change between the two runs; a table counted in unevaluated_tables was not compared. The changes list is paged in recorded order with total and next_cursor; every other key of the document rides the first page whole. A table's current state, rather than what changed, is get_table_context's answer.

ParametersJSON Schema
NameRequiredDescriptionDefault
kindNoKeep only changes of this kind
tableNoKeep only changes naming this fully-qualified table, including the relationship events that name it as source or target
cursorNo`next_cursor` from this call's previous page; omit for the first page
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses return semantics beyond structure, explaining that a statistic with no drift event did not change and that unevaluated_tables means the table was not compared. Pagination behavior ('changes is paged in recorded order with total and next_cursor; every other key rides the first page whole') is also disclosed, though permissions/auth and error behavior are not.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then structured as return-shape, edge-case semantics, pagination, and sibling boundary. Sentences are dense and clause-heavy but each carries distinct information, and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description must explain the return document, and it does: summary, changes, total, next_cursor, and the unevaluated_tables caveat. For a read-only paged diff tool this is close to complete, missing only failure/auth context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents kind, table, cursor and connection. The description's cursor/connection remarks largely restate the schema descriptions, adding little beyond them, so the baseline of 3 applies.

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?

The description names a specific verb+resource ('what changed between the database's last two prints') and unambiguously scopes it as a diff over recorded changes rather than current state. It explicitly draws the boundary with the sibling get_table_context, so an agent can distinguish the two without opening either schema.

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?

It states when this tool is the right answer (you want what changed, not current state) and names the alternative (get_table_context) with the condition that selects it. It stops short of covering the remaining siblings or stating explicit when-not conditions, but the routing guidance is clear.

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

get_manifestA

Return the print's index for a connection - its tables and the files each has, not a semantic catalogue of what they mean. Use it for an index field no other tool projects; for table names, row counts and staleness, list_tables with detail: true is shorter and already judges each table's freshness. The tables map is paged in FQN order with total and next_cursor; every other key of the document rides the first page whole, failed_tables filtered by pattern like tables.

ParametersJSON Schema
NameRequiredDescriptionDefault
cursorNo`next_cursor` from this call's previous page; omit for the first page
patternNofnmatch glob over the FQN keys of `tables`, the same spelling `list_tables` takes; filters that map and `failed_tables` only
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default

TDQS

A4.1/5.0
Behavior4/5

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

No annotations, so the description carries the full burden. It discloses non-obvious behavior: the `tables` map is paged in FQN order with `total`/`next_cursor`, every other document key arrives only on the first page, and `failed_tables` is filtered by `pattern` like `tables`. It omits the safety profile (read-only implied but unstated) and error/auth behavior, but the pagination semantics are the load-bearing disclosure here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose, then usage routing, then pagination mechanics. Dense and mostly waste-free, though the opening clause is syntactically tangled ('its tables and the files each has, not a semantic catalogue of what they mean').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description must convey return shape, and it does: `tables` map, `total`, `next_cursor`, and the first-page-only rule for other keys. Only the safety profile and any error/refresh behavior go unstated for a 3-param read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters, making 3 the correct baseline. The description corroborates rather than extends: it clarifies that `pattern` filters both `tables` and `failed_tables` and that `cursor` is the previous page's `next_cursor`, but adds little syntax or format detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource: returns a connection's index of tables and the files each has, and explicitly contrasts itself with a 'semantic catalogue of what they mean' (the get_table_context role). It distinguishes from list_tables too, though the phrase 'the print's index' is unexplained jargon that adds fog rather than precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use ('an index field no other tool projects') and a when-not with a named alternative plus its condition: 'for table names, row counts and staleness, list_tables with detail: true is shorter and already judges each table's freshness.' An agent can route correctly without opening another schema.

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

get_referenceA

Look up the dbprint format specification or the assertion DSL specification by section number, or the reading guide by heading: what a print's field means, or what a finding's spec_ref (e.g. '§2.2.4') refers to. A section returns its own text and lists its direct subsections, each read by its own number or heading; omit section for the heading tree. The guide is the one this dbprint version ships, not the copy stored with a print. Paged like get_table_context's md. Depends on no connection or print; what one print's tables hold is get_table_context's and list_tables' answer.

ParametersJSON Schema
NameRequiredDescriptionDefault
cursorNo`next_cursor` from this call's previous page; omit for the first page
sectionNoA section number in the document's own scheme (e.g. '3', '2.2.4'), or a spec_ref citation copied verbatim from a finding ('§2.2.4', 'ASSERTIONS.md §1.4') - any heading depth. Omit for the table of contents. For guide, a heading's text (e.g. 'Vocabulary'), matched case-insensitively.
documentYesWhich document - the format spec, the assertion DSL, or the reading guide (how to read each json/yaml field)

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does reasonably well: a section returns its own text and lists its direct subsections, results are paged like get_table_context's markdown, and the guide is version-bound rather than print-bound. It omits auth requirements, error behavior, and page-size limits, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first sentence and every subsequent sentence adds a distinct constraint (subsections, pagination, version scope, dependency scope). It is dense and slightly compressed in places ('Paged like get_table_context's md'), but there is little fat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description steps in to describe the return shape (section text plus its direct subsections) and pagination, which is exactly what an agent needs. It leaves out cursor expiry or error semantics, but for a read-only documentation lookup it is nearly complete.

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 baseline is 3, but the description adds meaning beyond the schema: it explains the spec_ref-citation workflow ('§2.2.4', 'ASSERTIONS.md §1.4'), clarifies that any heading depth works, and ties omission of `section` to the table of contents. That workflow context is not in the schema itself.

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 and resource: look up the dbprint format spec, the assertion DSL spec, or the reading guide, resolving field meanings and spec_ref citations. It explicitly distinguishes itself from siblings by noting it depends on no connection or print, whereas what a print's tables hold is get_table_context's and list_tables' answer.

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?

Gives clear conditions: omit `section` for the heading tree, use a section number or a spec_ref copied verbatim from a finding, and use a heading's text for the guide. It also scopes the answer ('the guide this dbprint version ships, not the copy stored with a print'), though it never states a negative case for when NOT to reach for this tool beyond the implicit sibling contrast.

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

get_table_contextA

Read one table. Call it before writing SQL against a table, with purpose: query: DDL, the Joins list (declared foreign keys, joins dbprint inferred from column names or measured from values, and joins a person added, tagged annotated - minus any a person rejected; a join mentioned only in the table's prose description is not in it), a data dictionary, the value lists a predicate is written from, with their counts and coverage, and each nullable column's null share, plus notes that apply to the whole database. Call it with the default purpose: profile to describe the data - statistics such as null rates, cardinality and ranges, joins, the table's prose description and notes. Use search_columns or list_tables first when the table is not yet known, and resolve_value to check how one phrase is spelled in one column. Paged: md and yaml end every page but the last with a next_cursor line, json carries it as a key; a section too long for one page continues on the next, never dropped. Under profile, md Notes summarise each column - a long value list shows its 5 most frequent values - while json and yaml carry the statistics whole; for json/yaml a _corrupted field names any of the table's print files that failed to parse.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYesDotted fully-qualified table name, as list_tables and search_columns return it
cursorNo`next_cursor` from this call's previous page; omit for the first page
formatNomd renders the chosen purpose as Markdown - under `profile`, a per-column Notes summary rather than the raw statistics fields json and yaml carry. All three omit each column's sketch (a hashed summary of its distinct values); the table's raw statistics file, sketch included, is the dbprint://<connection>/<table>/statistics resource. get_reference document: guide explains each json/yaml field.md
purposeNoquery before writing SQL: DDL, the Joins list, data dictionary and the value lists with counts and coverage, and each nullable column's null share, with no other statistics. profile (default) to describe the data: statistics, relationships, notesprofile
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default
include_statsNoInclude the Cardinality table (md) or statistics object (json/yaml); no effect under `query`, which carries neither
include_annotationsNoInclude the notes and claims people wrote on its columns and values, and notes that apply to the whole database, when written
include_descriptionNoInclude the table's prose description, when one was written
include_relationshipsNoInclude the Relationships section (md) or relationships object (json/yaml); under `query`, the Joins list

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: it discloses pagination semantics (next_cursor line in md/yaml vs a json key, sections continue rather than being dropped), the _corrupted field for unparseable files, the md-vs-json/yaml rendering difference for Notes/statistics, and the omission of column sketches (pointing to the dbprint:// statistics resource). This is rich behavioral context an agent cannot get from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then organized by concern (purpose modes, routing, paging, format differences). It is dense and long for a single paragraph, and the query-mode content list is partially restated in the schema, but nearly every sentence carries distinct operational information.

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?

With no output schema and no annotations across 9 parameters, the description compensates fully: it enumerates what each mode returns, how each format renders it, how paging terminates, and where to find raw statistics. Nothing an agent needs to call this correctly is missing.

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 baseline is 3, but the description adds real meaning: it explains that query omits statistics while profile carries them, that include_stats has no effect under query, that connection is only needed on multi-database servers, and that include_relationships switches to the Joins list under query. It adds value beyond the per-parameter prose without fully re-specifying every default.

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?

Opens with a specific verb+resource ('Read one table') and immediately distinguishes the two modes (purpose: query vs the default profile) with concrete content lists for each. It names the siblings it is not (search_columns, list_tables, resolve_value) so the agent can route without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use instructions: call with purpose: query before writing SQL against a table, and use search_columns or list_tables first when the table is not yet known, with resolve_value for spelling checks. Alternatives and their triggering conditions are all stated, not implied.

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

list_tablesA

List a connection's tables, optionally narrowed by an fnmatch pattern over the dotted names. Use it to see which tables exist, their row counts, and whether each table's statistics are stale: detail: true adds each table's type, row_count, columns and profiled_at, and a freshness verdict - live, stale, or dormant when profiled_at is unreadable - with its age_days and the max_age_days it is judged against. A table whose threshold cannot be resolved carries threshold_error instead of a verdict. To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest. Paged: every reply carries the total matched, and next_cursor while more remain.

ParametersJSON Schema
NameRequiredDescriptionDefault
cursorNo`next_cursor` from this call's previous page; omit for the first page
detailNoProject each entry's type/row_count/columns/profiled_at from the print's index plus its freshness verdict; false returns bare FQN strings, unchanged
patternNofnmatch glob over dotted table names, e.g. 'sales.*'; defaults to '*'
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it discharges most of it: it discloses what detail:true projects (type, row_count, columns, profiled_at), the freshness verdict vocabulary (live/stale/dormant), the threshold_error fallback, and pagination semantics (total always present, next_cursor while more remain). It omits permission/auth requirements and any rate-limit or cost behavior, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and alternative routing before descending into the detail-flag payload, so an agent can stop reading early. The middle clause about freshness verdicts is dense and slightly over-packed for the 10% weight it carries, but no sentence is wasted.

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?

There is no output schema, so the description must explain return values, and it does: bare FQN strings by default, the enriched fields under detail:true, the verdict logic, and the paging envelope with total and next_cursor. Combined with the connection-omission error note, an agent has everything needed to call and interpret this tool.

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 already 100%, so parameter documentation is largely handled there and the baseline is 3. The description adds genuine meaning beyond the schema by explaining what the projected fields mean and what verdicts imply, and by noting the connection-missing error lists available connections. Pattern/cursor semantics are essentially restated from the schema rather than extended.

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 and resource ('List a connection's tables') plus a scoping modifier (fnmatch pattern over dotted names). It explicitly distinguishes itself from siblings ('To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest'), so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a positive use case ('see which tables exist, their row counts, and whether statistics are stale') and names two explicit alternatives with the condition that selects each ('To find columns rather than tables, use search_columns; for the print's raw table index, get_manifest'). Nothing is left to inference.

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

resolve_valueA

Resolve a phrase, a code or a spelling against one column's published values, before writing a literal into a filter whose stored spelling get_table_context does not already list in full. Answers, in order of preference: stored - the text is a listed value, or folds to one, and the reply carries the spelling a predicate must use; definition - the text names what a value's note says it means; nearest - the listed values closest to the text, ranked; none; or unavailable where the column publishes no value list, lost it on the latest print, or redacts it. Every reply carries the column's coverage and how many values the print listed, plus a caveat sentence wherever that list is a sample - a spelling absent from a sample is not evidence it is absent from the column. An exhaustive list of at most fifty values rides along whole as domain, so a small vocabulary needs one call; on a table read in part, exhaustive is false, the reply carries the table's scope and row_count, and domain is the scanned rows' whole domain. Paged: every page repeats the scalar keys; the answer list comes before domain.

ParametersJSON Schema
NameRequiredDescriptionDefault
partNoA part of the column, by its path as the print keys it (`.status`, `[*]`); omit it to resolve against the column itself
textYesThe phrase, code or spelling from the question, as written
tableYesFully-qualified table name
columnYesColumn name as the print spells it
cursorNo`next_cursor` from this call's previous page; omit for the first page
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations the description carries the full burden and mostly does: it enumerates the reply variants (stored/definition/nearest/none/unavailable), the `coverage`/`listed` fields, the sample caveat, `exhaustive`/`scope`/`row_count`, and paging semantics. It never explicitly states the operation is read-only or side-effect-free, leaving safety to inference.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the key filter caveat are front-loaded, and most sentences carry real information (reply precedence order, sampling caveat, paging). It is dense and idiom-heavy ('the print', 'rides along whole', 'lost it on the latest print'), which slightly hurts scannability but isn't wasted words.

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?

There is no output schema, so the description must explain return values, and it does thoroughly — reply variants, coverage/listed counters, sample caveat, `domain` for small vocabularies, partial-read `scope`/`row_count`, and paging order. Nothing an agent needs to call and interpret this tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the six parameters are already documented (including `part` path syntax and `cursor`). The description adds only marginal parameter-level meaning, mainly paging notes that are really about the reply shape; baseline 3 is appropriate.

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+resource+scope: resolving a phrase/code/spelling against one column's published values. It explicitly distinguishes itself from sibling `get_table_context` by describing the exact gap it fills ('whose stored spelling get_table_context does not already list in full').

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?

Names the trigger condition clearly — use before writing a literal into a filter when the stored spelling isn't fully listed by `get_table_context` — and the `unavailable`/`none` branches hint at when it won't help. It stops short of explicit when-not guidance or naming other siblings, but the context is concrete.

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

search_columnsA

Find columns across every table - the first call when the table holding a fact is not yet known. Filters, all optional and ANDed: a name glob, a text search over column names and their notes, and classification/sql_type/sensitivity/looks_like/redacted globs and a candidate_key match - for example every column holding an email address (looks_like: email) or contact details (sensitivity: contact). Read a table found this way with get_table_context; list tables rather than columns with list_tables. A match on a table read in part carries its scope block with rows_scanned/row_count, so a caller can tell a scanned-set number or key from a table-wide one; a match carrying a looks_like verdict carries the sampled/matched draw behind it, since a verdict from two values reads identically to one from ten thousand otherwise. A match carries sensitivity/redacted/candidate_key (and candidate_key_exception where the ratio falls short of 1.0) whenever the column does, so filtering on any of them returns the matched category, not just a bare column name. Paged: every reply carries the total matched, and next_cursor while more remain. A result carries unreadable_tables only when a table's own statistics or annotations failed to parse, on its first page: a statistics failure drops that table's columns from matches entirely; an annotations-only failure still returns them, without the annotation. A looks_like search also carries switched_off_tables on its first page, naming each table whose looks_like detection was switched off, where a non-match is not a finding.

ParametersJSON Schema
NameRequiredDescriptionDefault
textNoCase-insensitive substring matched against the column name, the note people wrote on it and its per-value notes - words, not meaning. A match found through per-value notes carries them as `value_notes`
cursorNo`next_cursor` from this call's previous page; omit for the first page
patternNofnmatch glob over column names, and over a part as `<column><path>` (`items[*].sku`); optional - omit to filter by the other predicates alone
redactedNofnmatch glob against the column's redacted marker (drop, hash, mask)
sql_typeNofnmatch glob against the column's sql_type
connectionNoWhich database to read, by connection name; needed only when the server serves several, and the error for a missing one lists them. Omit it for the server's default
looks_likeNofnmatch glob against inferred.looks_like (base64, bic, card_number, content_type, country_code, currency_code, ean, email, filename, gif, gzip, hex, iban, imei, ip, isbn, iso8601_date, iso8601_datetime, iso8601_duration, jpeg, json, jwt, latlon, mac_address, numeric_string, path, pdf, phone, png, postal_code, prose, semver, timezone, url, urn, uuid, vin, zip)
sensitivityNofnmatch glob against inferred.sensitivity (contact, credential, date_of_birth, demographic, employment, financial_account, geolocation, health, national_id, online_identifier, personal_name, postal_address) - a glob of '*' sweeps every column carrying any detection. A detection, never a verdict; its absence on a column is not an assertion that the column is safe
candidate_keyNoExact match against inferred.candidate_key
classificationNofnmatch glob against the column's classification (binary, boolean, categorical, composite, foreign_key_candidate, json, numeric, spatial, temporal, text, unsupported, vector)

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden — and it delivers: ANDed filter semantics, pagination (total, next_cursor), partial-scan scope blocks, sampling behind looks_like verdicts, and two distinct failure surfaces (unreadable_tables, switched_off_tables) with the differing consequences of statistics vs annotation failures. This is unusually rich behavioral context for a read tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded — purpose, then routing, then filter semantics, then return/paging behavior. It is dense and long, and the closing sentences on unreadable_tables/switched_off_tables are heavy, but with no output schema the detail is load-bearing rather than padding.

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?

With no output schema and 10 optional parameters, the description compensates fully: it describes the shape of a match, echoed classification fields, candidate_key_exception, page metadata, and conditional error fields. An agent has everything needed to call it and interpret results.

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 baseline is 3, but the description adds real value beyond it: it explains that filters are optional and ANDed, gives concrete combined examples (looks_like: email, sensitivity: contact), and clarifies that filtered fields are echoed back on matches.

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 precise verb+resource ('Find columns across every table') and immediately frames the discovery scenario ('the first call when the table holding a fact is not yet known'). It explicitly distinguishes itself from siblings that could be confused with it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('first call when the table holding a fact is not yet known') and names both alternatives with their selecting conditions: get_table_context to read a found table, list_tables when you want tables rather than columns. No inference required.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updatesv0.1.0
    • First observedget_diff
    • First observedget_manifest
    • First observedget_reference
    • First observedget_table_context
    • First observedlist_tables
    • First observedresolve_value
    • First observedsearch_columns

TDQS

A4.4/5.0

Scored across 7 tools

Disambiguation4/5

Each tool has a distinct primary purpose (read one table, list tables, search columns, resolve a value, index, diff, spec lookup), and descriptions explicitly cross-reference each other to steer selection. There is minor residual overlap between list_tables and get_manifest (both expose table index info) and between get_table_context and get_manifest, but the descriptions clearly delineate the boundaries.

Naming Consistency5/5

All seven tools follow a clean verb_noun snake_case pattern: get_table_context, list_tables, search_columns, resolve_value, get_manifest, get_diff, get_reference. Consistent convention throughout.

Tool Count5/5

Seven tools is well-scoped for a database-context/print-reading server, and each tool maps to a distinct capability rather than a redundant variant.

Completeness4/5

The surface covers discovery (list_tables, search_columns), inspection (get_table_context), value resolution (resolve_value), raw index (get_manifest), change tracking (get_diff), and spec docs (get_reference). For a read-only context server this is near-complete; only tangential gaps like listing/selecting connections or refreshing prints are absent, both reasonably out of scope.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Exposes a SQLite database to AI assistants with structured, read-safe access. Includes five tools for schema exploration, querying, and sampling data.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Exposes tools that let AI coding agents browse a repo's schema snapshot of tables and columns and validate their SQL against it before running or writing it, so queries referencing invented or stale table and column names get caught and corrected up front. Provides list_tables, describe_table, search_columns, and check_sql over the same snapshot used by the CLI, hook, and CI check.
    4
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to explore and query approved portions of local SQLite snapshots through denylist-free, policy-restricted typed MCP tools, including schema inspection, safe SELECT queries, table statistics, and schema-fingerprint verification. Sanitizes unmasked outputs and denies undeclared tables and sensitive columns so disclosures stay limited even during advanced queries.
    MIT