Skip to main content
Glama
db-conn-mcp

db-conn-mcp

dump_schema_faithful

Produce a byte-faithful schema dump using pg_dump -s, returning DDL inline or writing a timestamped SQL file when output_dir is set; requires pg_dump on the server.

Instructions

Produce a byte-faithful schema dump using the database's own tool (pg_dump -s).

The most complete/runnable schema export (handles sequences, identity, partitioning, etc.) but REQUIRES the pg_dump binary on the machine running this server. Returns the DDL inline (or writes {database}_schema_{UTC}.sql when output_dir is set). If pg_dump isn't installed it returns {status: "pg_dump_not_found", message}: offer to install pg_dump for the user (see the faithful_schema_export prompt), then retry — or use get_database_schema(format="sql") which needs no extra tools.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "database": "<database>"
    },
    "name": "dump_schema_faithful"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseYes
output_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the external binary dependency, the dual output modes (inline DDL vs. writing '{database}_schema_{UTC}.sql' when output_dir is set), and the exact failure payload {status: "pg_dump_not_found", message}. The remaining gap is that it never explicitly frames the operation as read-only/non-mutating, which an agent must infer from 'dump'.

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?

Content is front-loaded: capability first, then completeness claim, then prerequisite, then output modes, then failure handling. Dense but nearly every sentence earns its place; the parenthetical list and the trailing prompt reference are slightly verbose but functional.

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, and the description compensates fully by documenting the return shapes: inline DDL, a written .sql file path, and a structured error object. Prerequisites and fallback path are all present, so an agent has everything needed to call this correctly or recover.

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 0%, so the description must compensate and it only partly does. It names output_dir and explains its effect plus the generated filename, but 'database' is never described (name vs. connection identifier, qualification rules), leaving one of two parameters semantically bare.

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 first sentence states a specific verb and resource ('produce a byte-faithful schema dump') plus the mechanism ('pg_dump -s'). It explicitly contrasts with the sibling get_database_schema(format="sql"), so an agent can discriminate between 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 Guidelines5/5

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

It states when to prefer this tool (most complete/runnable export, handles sequences, identity, partitioning), the prerequisite that gates use (pg_dump binary must be installed), the exact remediation path on failure (offer install, see faithful_schema_export prompt, retry), and a concrete alternative when the prerequisite can't be met. 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.