Skip to main content
Glama
HenkDz

PostgreSQL MCP Server

by HenkDz

PostgreSQL MCP Server

A Model Context Protocol (MCP) server that provides comprehensive PostgreSQL database management capabilities for AI assistants.

🚀 What's New: This server has been completely redesigned from 46 individual tools to 18 intelligent tools through consolidation (34→8 meta-tools) and enhancement (+4 new tools), providing better AI discovery while adding powerful data manipulation and comment management capabilities.

Breaking Changes in 2.0.0

Version 2.0.0 introduces security boundaries that intentionally change default behavior from the 1.x line:

  • The server starts in readonly mode. Mutations, DDL, role administration, filesystem import/export, and arbitrary SQL require --security-mode write, --security-mode admin, or --security-mode unsafe as appropriate.

  • Destructive operations such as drops, resets, broad role grants, and arbitrary SQL require --allow-destructive.

  • Per-tool connectionString, sourceConnectionString, and targetConnectionString arguments are disabled by default. Use server-level --connection-string or POSTGRES_CONNECTION_STRING, or explicitly opt in with --allow-tool-connection-string.

  • Legacy string where clauses are rejected for mutation, index, export, and copy filters. Use structured where predicates, or rawWhere only with --security-mode unsafe --allow-destructive.

  • Multi-statement pg_execute_sql calls must use transactional: true, expectRows: false, and no bind parameters.

  • Tool schemas reject unknown fields, so misspelled or unintended inputs fail before connection resolution.

  • User and target identifiers are restricted to safe simple PostgreSQL identifiers.

For the non-breaking security patch line, use @henkey/postgres-mcp-server@1.0.7.

Related MCP server: PostgreSQL MCP Server

Quick Start

Prerequisites

  • Node.js ≥18.0.0

  • Access to a PostgreSQL server

  • (Optional) An MCP client like Cursor or Claude for AI integration

Install MCP Server

# Install globally
npm install -g @henkey/postgres-mcp-server

# Or run directly with npx (no installation)
# Use env var for connection string (optional)
export POSTGRES_CONNECTION_STRING="postgresql://user:pass@localhost:5432/db"
npx @henkey/postgres-mcp-server
# Or pass directly:
npx @henkey/postgres-mcp-server --connection-string "postgresql://user:pass@localhost:5432/db"

Verify installation

npx @henkey/postgres-mcp-server --help

Add to your MCP client configuration:

{
  "mcpServers": {
    "postgresql-mcp": {
      "command": "npx",
      "args": [
        "@henkey/postgres-mcp-server",
        "--connection-string", "postgresql://user:password@host:port/database"
      ]
    }
  }
}

Option 2: Install via Smithery

npx -y @smithery/cli install @HenkDz/postgresql-mcp-server --client claude
# Build the Docker image
docker build -t postgres-mcp-server .

# Run with environment variable
docker run -i --rm \
  -e POSTGRES_CONNECTION_STRING="postgresql://user:password@host:port/database" \
  postgres-mcp-server

Add to your MCP client configuration:

{
  "mcpServers": {
    "postgresql-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "henkey/postgres-mcp:latest",
        "-e",
        "POSTGRES_CONNECTION_STRING"
      ],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:password@host:port/database"
      }
    }
  }
}

Option 4: Manual Installation (Development)

git clone <repository-url>
cd postgresql-mcp-server
npm install
npm run build

Add to your MCP client configuration:

{
  "mcpServers": {
    "postgresql-mcp": {
      "command": "node",
      "args": [
        "/path/to/postgresql-mcp-server/build/index.js",
        "--connection-string", "postgresql://user:password@host:port/database"
      ]
    }
  }
}

Security Modes

The server now starts in readonly mode by default. Tools may still be listed for MCP discovery, but every call is classified and checked before it reaches the database.

Mode

Allows

Blocks by default

readonly

schema inspection, analysis, monitoring, SELECT-style query tools

mutations, DDL, role changes, filesystem import/export, arbitrary SQL

write

readonly operations plus data mutations

DDL, role changes, filesystem import/export, arbitrary SQL

admin

write operations plus schema, index, function, trigger, RLS, role, and filesystem tools

arbitrary SQL

unsafe

all tool categories, including arbitrary SQL

destructive operations unless explicitly allowed

Destructive operations such as drops, resets, and arbitrary SQL also require explicit opt-in:

# Default: readonly, no per-tool connection strings
npx @henkey/postgres-mcp-server --connection-string "postgresql://readonly_user:pass@host:5432/db"

# Enable DML mutations, but still block DDL/admin/arbitrary SQL
npx @henkey/postgres-mcp-server --security-mode write --connection-string "postgresql://app_writer:pass@host:5432/db"

# Enable admin tools and destructive operations
npx @henkey/postgres-mcp-server --security-mode admin --allow-destructive --connection-string "postgresql://admin_user:pass@host:5432/db"

# Enable arbitrary SQL only for trusted local/admin use
npx @henkey/postgres-mcp-server --security-mode unsafe --allow-destructive --connection-string "postgresql://admin_user:pass@host:5432/db"

Per-tool connectionString, sourceConnectionString, and targetConnectionString arguments are disabled by default. Prefer a fixed server-level connection string with a least-privilege PostgreSQL role. For development only, enable per-tool connection strings with --allow-tool-connection-string or POSTGRES_MCP_ALLOW_TOOL_CONNECTION_STRING=true. Explicit per-tool, CLI, and POSTGRES_CONNECTION_STRING values must be non-empty strings. Blank higher-priority connection strings fail validation instead of falling back to lower-priority sources.

Optionally restrict all server-level and per-tool connection strings to an allowlist with --allowed-connection-target, allowedConnectionTargets, or POSTGRES_MCP_ALLOWED_CONNECTION_TARGETS. Target patterns use [user@]host[:port][/database]; omitted fields are unconstrained and * is allowed only as a full-field wildcard, for example readonly@db.internal:5432/app or *@localhost:*/dev.

For deployment grants, see PostgreSQL Role Templates. The templates split readonly, writer, schema-admin, and role-admin credentials so the PostgreSQL role remains aligned with the selected MCP securityMode.

Security settings can also be placed in the tools config file:

{
  "securityMode": "readonly",
  "allowDestructive": false,
  "allowToolConnectionString": false,
  "workspaceDir": "/path/to/mcp-workspace",
  "auditFile": "/path/to/postgres-mcp-audit.jsonl",
  "maxConnections": 20,
  "idleTimeoutMillis": 30000,
  "connectionTimeoutMillis": 2000,
  "maxFileBytes": 10485760,
  "statementTimeoutMs": 30000,
  "queryTimeoutMs": 45000,
  "lockTimeoutMs": 10000,
  "idleInTransactionSessionTimeoutMs": 60000,
  "allowedConnectionTargets": [
    "readonly@db.internal:5432/app"
  ],
  "enabledTools": [
    "pg_analyze_database",
    "pg_manage_schema",
    "pg_execute_query"
  ]
}

Runtime configuration precedence is CLI options, then the tools config file, then environment variables. Explicit false values in the tools config override enabling environment variables such as POSTGRES_MCP_ALLOW_DESTRUCTIVE=true.

If a tools config path is provided, the server treats it as required: unreadable, malformed, non-object, incorrectly typed, unknown-key, invalid securityMode, or unknown enabledTools entries stop startup instead of falling back to all available tools.

CLI options:

  • --version

  • --connection-string

  • --tools-config

  • --security-mode

  • --allow-destructive

  • --allow-tool-connection-string

  • --workspace-dir

  • --audit-file

  • --max-connections

  • --idle-timeout-ms

  • --connection-timeout-ms

  • --max-file-bytes

  • --statement-timeout-ms

  • --query-timeout-ms

  • --lock-timeout-ms

  • --idle-in-transaction-session-timeout-ms

  • --allowed-connection-target

Environment variables:

  • POSTGRES_TOOLS_CONFIG=/path/to/tools.json

  • POSTGRES_MCP_SECURITY_MODE=readonly|write|admin|unsafe

  • POSTGRES_MCP_ALLOW_DESTRUCTIVE=true

  • POSTGRES_MCP_ALLOW_TOOL_CONNECTION_STRING=true

  • POSTGRES_MCP_WORKSPACE_DIR=/path/to/mcp-workspace

  • POSTGRES_MCP_AUDIT_FILE=/path/to/postgres-mcp-audit.jsonl

  • POSTGRES_MCP_MAX_CONNECTIONS=20

  • POSTGRES_MCP_IDLE_TIMEOUT_MS=30000

  • POSTGRES_MCP_CONNECTION_TIMEOUT_MS=2000

  • POSTGRES_MCP_MAX_FILE_BYTES=10485760

  • POSTGRES_MCP_STATEMENT_TIMEOUT_MS=60000

  • POSTGRES_MCP_QUERY_TIMEOUT_MS=65000

  • POSTGRES_MCP_LOCK_TIMEOUT_MS=10000

  • POSTGRES_MCP_IDLE_IN_TRANSACTION_SESSION_TIMEOUT_MS=60000

  • POSTGRES_MCP_ALLOWED_CONNECTION_TARGETS=readonly@db.internal:5432/app,*@localhost:*/dev

  • POSTGRES_MCP_DEBUG_SQL=true to opt into verbose pg-monitor SQL tracing. This may log raw SQL and bind values, so leave it disabled unless you are debugging a trusted local database.

Boolean environment flags must be exactly true or false when set. Numeric resource settings from CLI, tools config, or environment variables must be positive integers. Runtime defaults use a 20-connection pool, a 30000 ms pool idle timeout, a 2000 ms connection timeout, a 60000 ms PostgreSQL statement_timeout, a 65000 ms node-postgres query timeout, a 10000 ms PostgreSQL lock_timeout, and a 60000 ms PostgreSQL idle_in_transaction_session_timeout. Pool and timeout settings can be raised or lowered with --max-connections, --idle-timeout-ms, --connection-timeout-ms, --statement-timeout-ms, --query-timeout-ms, --lock-timeout-ms, --idle-in-transaction-session-timeout-ms, maxConnections, idleTimeoutMillis, connectionTimeoutMillis, statementTimeoutMs, queryTimeoutMs, lockTimeoutMs, idleInTransactionSessionTimeoutMs, POSTGRES_MCP_MAX_CONNECTIONS, POSTGRES_MCP_IDLE_TIMEOUT_MS, POSTGRES_MCP_CONNECTION_TIMEOUT_MS, POSTGRES_MCP_STATEMENT_TIMEOUT_MS, POSTGRES_MCP_QUERY_TIMEOUT_MS, POSTGRES_MCP_LOCK_TIMEOUT_MS, or POSTGRES_MCP_IDLE_IN_TRANSACTION_SESSION_TIMEOUT_MS. Explicit connection string, workspaceDir, auditFile, --workspace-dir, and --audit-file values must be non-empty strings. Connection target allowlists are enforced before tool execution for per-tool connection strings and during connection resolution for server-level sources. When an allowlist is configured, connection strings must be PostgreSQL URL or keyword-style strings with an explicit host or hostaddr.

Mutation, index, export, and copy filters should use structured where predicates. Legacy string where clauses are rejected; the explicit rawWhere escape hatch is treated as arbitrary SQL and requires --security-mode unsafe --allow-destructive.

EXPLAIN tools only accept one read-only statement and run inside a read-only transaction. analyze: true still requires unsafe mode because PostgreSQL executes the supplied query to collect runtime statistics.

Multi-statement pg_execute_sql calls must use transactional: true, expectRows: false, and no bind parameters. Use a single parameterized statement or CTE when bind parameters are needed.

Error messages, diagnostics, and catalog metadata are sanitized by default. SQL text from pg_stat_statements, function definitions, RLS predicates, check constraints, index definitions, and column defaults are redacted unless they are intentionally returned as user data. Data execution, query/performance, schema, index, constraint, user/permission, trigger, comment, function, RLS, migration, and diagnostic tools reject unknown input fields so misspelled or unintended parameters fail before connection resolution.

Denied security-boundary requests emit one structured stderr line prefixed with [MCP Audit]. Audit events include sanitized fields such as toolName, reason, securityMode, risk, and whether per-tool connection strings were present; they do not log raw SQL, full request payloads, or connection-string passwords. Set POSTGRES_MCP_AUDIT_FILE, --audit-file, or auditFile to append the same sanitized audit events to a JSONL file.

Filesystem tools such as table export/import require a workspace directory and only read or write .json and .csv files inside it:

npx @henkey/postgres-mcp-server \
  --security-mode admin \
  --allow-destructive \
  --workspace-dir /path/to/mcp-workspace \
  --connection-string "postgresql://admin_user:pass@host:5432/db"

What's Included

18 powerful tools organized into three categories:

  • 🔄 Consolidation: 34 original tools consolidated into 8 intelligent meta-tools

  • 🔧 Specialized: 6 tools kept separate for complex operations

  • 🆕 Enhancement: 4 brand new tools (not in original 46)

📊 Consolidated Meta-Tools (8 tools)

  • Schema Management - Tables, columns, ENUMs, constraints

  • User & Permissions - Create users, grant/revoke permissions

  • Query Performance - EXPLAIN plans, slow queries, statistics

  • Index Management - Create, analyze, optimize indexes

  • Functions - Create, modify, manage stored functions

  • Triggers - Database trigger management

  • Constraints - Foreign keys, checks, unique constraints

  • Row-Level Security - RLS policies and management

🚀 Enhancement Tools (4 NEW tools)

Brand new capabilities not available in the original 46 tools

  • Execute Query - SELECT operations with count/exists support

  • Execute Mutation - INSERT/UPDATE/DELETE/UPSERT operations

  • Execute SQL - Arbitrary SQL execution with transaction support

  • Comments Management - Comprehensive comment management for all database objects

🔧 Specialized Tools (6 tools)

  • Database Analysis - Performance and configuration analysis

  • Debug Database - Troubleshoot connection, performance, locks

  • Data Export - JSON/CSV data export

  • Data Import - JSON/CSV data import

  • Copy Between Databases - Cross-database data transfer

  • Real-time Monitoring - Live database metrics and alerts

Example Usage

// Analyze database performance
{ "analysisType": "performance", "schema": "public" }

// Create a table with constraints
{
  "operation": "create_table",
  "tableName": "users", 
  "columns": [
    { "name": "id", "type": "SERIAL PRIMARY KEY" },
    { "name": "email", "type": "VARCHAR(255) UNIQUE NOT NULL" }
  ]
}

// Query data with parameters
{
  "operation": "select",
  "query": "SELECT * FROM users WHERE created_at > $1",
  "parameters": ["2024-01-01"],
  "limit": 100
}
// Select results are always bounded: default limit 100, max 1000.

// Insert new data
{
  "operation": "insert",
  "table": "users",
  "data": {"name": "John Doe", "email": "john@example.com"},
  "returning": "*",
  "maxReturningRows": 100
}
// Mutation RETURNING output is capped in the response: default 100, max 1000.

// Find slow queries
{
  "operation": "get_slow_queries",
  "limit": 5,
  "minDuration": 100
}

// Execute a parameterized SELECT query
{
  "operation": "select",
  "query": "SELECT * FROM users WHERE id = $1",
  "parameters": [1]
}

// Perform an INSERT mutation
{
  "operation": "insert",
  "table": "products",
  "data": {"name": "New Product", "price": 99.99},
  "returning": "id",
  "maxReturningRows": 100
}

// Perform an UPDATE mutation with a structured WHERE predicate
{
  "operation": "update",
  "table": "products",
  "data": {"price": 89.99},
  "where": {"id": 123},
  "returning": ["id", "price"]
}

// Manage database object comments
{
  "operation": "set",
  "objectType": "table",
  "objectName": "users",
  "comment": "Main user account information table"
}

📚 Documentation

📋 Complete Tool Schema Reference - All 18 tool parameters & examples in one place

For additional information, see the docs/ folder:

Features Highlights

🔄 Consolidation Achievements

34→8 meta-tools - Intelligent consolidation for better AI discovery
Multiple operations per tool - Unified schemas with operation parameters
Smart parameter validation - Clear error messages and type safety

🆕 Enhanced Data Capabilities

Complete CRUD operations - INSERT/UPDATE/DELETE/UPSERT with parameterized queries
Flexible querying - SELECT with count/exists support and bounded safety limits ✅ Arbitrary SQL execution - Transaction support for complex operations

🔧 Production Ready

Controlled connection - CLI args or env vars by default; per-tool connection strings require opt-in ✅ Security focused - Read-only default mode, centralized policy checks, structured mutation predicates ✅ Robust architecture - Connection pooling, comprehensive error handling

Docker Usage

The PostgreSQL MCP Server is fully Docker-compatible and can be used in production environments. The image uses a multi-stage build, installs only production dependencies in the runtime stage, and runs as the non-root node user.

Building the Image

# Build locally
docker build -t postgres-mcp-server .

# Or pull from Docker Hub
docker pull henkey/postgres-mcp:latest

Running with Environment Variables

# Basic usage (using Docker Hub image)
docker run -i --rm \
  -e POSTGRES_CONNECTION_STRING="postgresql://user:password@host:port/database" \
  henkey/postgres-mcp:latest

# Or with locally built image
docker run -i --rm \
  -e POSTGRES_CONNECTION_STRING="postgresql://user:password@host:port/database" \
  postgres-mcp-server

# With tools configuration
docker run -i --rm \
  -e POSTGRES_CONNECTION_STRING="postgresql://user:password@host:port/database" \
  -e POSTGRES_TOOLS_CONFIG="/app/config/tools.json" \
  -v /path/to/config:/app/config \
  postgres-mcp-server

Docker Compose Example

version: '3.8'
services:
  postgres-mcp:
    build: .
    environment:
      - POSTGRES_CONNECTION_STRING=postgresql://user:password@postgres:5432/database
    depends_on:
      - postgres
    stdin_open: true
    tty: true

  postgres:
    image: postgres:15
    environment:
      - POSTGRES_DB=database
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=password
    ports:
      - "5432:5432"

MCP Client Configuration

For use with MCP clients like Cursor or Claude Desktop:

{
  "mcpServers": {
    "postgresql-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "POSTGRES_CONNECTION_STRING",
        "henkey/postgres-mcp:latest"
      ],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:password@host:port/database"
      }
    }
  }
}

Prerequisites

  • Node.js ≥ 18.0.0 (for local development)

  • Docker (for containerized deployment)

  • PostgreSQL server access

  • Valid connection credentials

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Commit your changes

  4. Create a Pull Request

See Development Guide for detailed setup instructions.

License

AGPLv3 License - see LICENSE file for details.

Available Tools

18 tools
pg_analyze_databaseC

Analyze PostgreSQL database configuration and performance

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional if POSTGRES_CONNECTION_STRING environment variable or --connection-string CLI option is set)
analysisTypeNoType of analysis to perform

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions analysis but doesn't disclose behavioral traits such as whether it's read-only or has side effects, performance impact, required permissions, or output format. This is inadequate for a tool that interacts with a database.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's front-loaded and appropriately sized, making it easy to parse without unnecessary details.

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

Completeness2/5

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

Given the complexity of database analysis, lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the analysis entails, potential impacts, or return values, leaving significant gaps for an AI agent to understand the tool's behavior.

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 fully documents the two parameters. The description adds no additional meaning beyond implying analysis types, which the schema already covers with the enum. Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the action ('Analyze') and resource ('PostgreSQL database configuration and performance'), making the purpose understandable. However, it doesn't differentiate from sibling tools like pg_debug_database or pg_monitor_database, which might have overlapping analysis functions, so it misses full sibling distinction.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. With multiple sibling tools like pg_debug_database and pg_monitor_database that could involve analysis, the description lacks any context or exclusions, leaving the agent to guess based on tool names alone.

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

pg_copy_between_databasesC

Copy data between two databases

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceConnectionStringYes
targetConnectionStringYes
tableNameYes
whereNo
truncateTargetNo

TDQS

C2.8/5.0
Behavior2/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 of behavioral disclosure. 'Copy data between two databases' implies a write operation to the target database, but it doesn't disclose critical traits like whether this requires specific permissions, if it's a bulk operation, what happens on failure, or if there are rate limits. For a tool with 5 parameters and no annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's appropriately sized for the tool's name and gets straight to the point without unnecessary elaboration. Every word earns its place in conveying the core functionality.

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

Completeness2/5

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

Given the complexity (5 parameters, no annotations, no output schema, and 0% schema coverage), the description is inadequate. It doesn't explain what the tool returns, how parameters interact, or the operational context. For a data copying tool with multiple configuration options, more completeness is needed to guide effective use.

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

Parameters2/5

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

Schema description coverage is 0%, meaning none of the 5 parameters have descriptions in the schema. The tool description doesn't mention any parameters or provide meaning beyond the basic action. It fails to compensate for the lack of schema documentation, leaving parameters like 'where' and 'truncateTarget' completely unexplained in context.

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?

The description 'Copy data between two databases' clearly states the verb (copy) and resource (data between databases). It's specific about the action but doesn't differentiate from sibling tools like pg_export_table_data or pg_import_table_data, which might handle similar data movement operations. The purpose is unambiguous but lacks sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like pg_export_table_data and pg_import_table_data that might handle similar data transfer tasks, there's no indication of when this tool is preferred or what specific scenarios it addresses. No exclusions or prerequisites are mentioned.

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

pg_debug_databaseC

Debug common PostgreSQL issues

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNo
issueYes
logLevelNoinfo

TDQS

C2/5.0
Behavior2/5

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

With no annotations, the description carries full burden but only hints at behavior ('debug') without details on actions (e.g., read-only vs. destructive), side effects, or output. It fails to disclose critical traits like whether it modifies data, requires specific permissions, or handles errors.

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?

The description is a single, efficient sentence with no wasted words, making it appropriately concise. However, it's under-specified rather than optimally structured for clarity.

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

Completeness2/5

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

For a 3-parameter tool with no annotations, no output schema, and 0% schema coverage, the description is incomplete. It lacks details on behavior, parameters, and expected outcomes, making it inadequate for effective tool selection and invocation.

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

Parameters2/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 but adds no parameter meaning. It doesn't explain what 'connectionString', 'issue', or 'logLevel' do, leaving all three parameters undocumented beyond their schema enums.

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

Purpose2/5

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

The description 'Debug common PostgreSQL issues' states a general purpose but lacks specificity about what 'debug' entails (e.g., diagnostics, analysis, fixes) and doesn't distinguish from siblings like pg_analyze_database or pg_monitor_database. It's vague about the verb and resource scope.

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

Usage Guidelines1/5

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

No guidance on when to use this tool versus alternatives is provided. It doesn't mention prerequisites, context, or exclusions, leaving the agent to guess based on the generic description and sibling names.

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

pg_execute_mutationC

Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT) - operation="insert/update/delete/upsert" with table and data. Examples: operation="insert", table="users", data={"name":"John","email":"john@example.com"}

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesMutation operation: insert (add rows), update (modify rows), delete (remove rows), upsert (insert or update)
tableYesTable name for the operation
dataNoData object with column-value pairs (required for insert/update/upsert)
whereNoWHERE clause for update/delete operations (without WHERE keyword)
conflictColumnsNoColumns for conflict resolution in upsert (ON CONFLICT)
returningNoRETURNING clause to get back inserted/updated data
schemaNoSchema name (defaults to public)public

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is for data modification operations, implying mutations, but doesn't cover critical behaviors: no mention of permissions required, transaction handling, error behavior, or what happens on failure. The example shows basic usage but lacks depth on constraints, side effects, or safety considerations for a mutation 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?

The description is appropriately concise with two sentences: a clear purpose statement followed by a concrete example. The example efficiently demonstrates key parameters. No wasted words, though it could be slightly more structured by separating usage notes from the example.

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

Completeness2/5

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

For a complex mutation tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain return values, error handling, transaction behavior, or security implications. The example helps but doesn't compensate for missing behavioral context needed for safe database operations.

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 8 parameters thoroughly. The description adds minimal value beyond the schema: it mentions operation, table, and data in the example but doesn't explain parameter interactions (e.g., when 'where' is required) or provide additional context. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Execute data modification operations (INSERT/UPDATE/DELETE/UPSERT)' with specific verbs and resources. It distinguishes from sibling tools like pg_execute_query by focusing on mutations rather than queries, though it doesn't explicitly name alternatives. The example reinforces the purpose but doesn't fully differentiate from all siblings.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions the operation types but doesn't explain when to choose insert vs update vs delete vs upsert, nor does it reference sibling tools like pg_execute_query for read operations or pg_manage_* tools for schema changes. Usage context is implied but not explicit.

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

pg_execute_queryA

Execute SELECT queries and data retrieval operations - operation="select/count/exists" with query and optional parameters. Examples: operation="select", query="SELECT * FROM users WHERE created_at > $1", parameters=["2024-01-01"]

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesQuery operation: select (fetch rows), count (count rows), exists (check existence)
queryYesSQL SELECT query to execute
parametersNoParameter values for prepared statement placeholders ($1, $2, etc.)
limitNoMaximum number of rows to return (safety limit)
timeoutNoQuery timeout in milliseconds

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. While it mentions the tool executes queries with parameters and examples, it lacks critical behavioral details: it doesn't disclose safety limits (though 'limit' parameter exists in schema), authentication needs (connectionString handling), error handling, or return format. The description adds minimal value beyond basic operation explanation.

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?

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The example adds practical value without being verbose. However, the second sentence could be slightly more structured, and there's some redundancy between the operation explanation and the example.

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

Completeness2/5

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

Given the complexity of a database query tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain return formats, error conditions, connection handling, or safety implications despite the 'limit' parameter suggesting row limiting behavior. For a tool with this level of complexity, more contextual information is needed.

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 baseline is 3. The description adds some value by explaining the 'operation' parameter with examples ('operation="select", query="SELECT * FROM users..."'), but doesn't provide additional semantics beyond what the schema already documents for other parameters like 'limit' or 'timeout'.

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 clearly states the tool's purpose with specific verbs ('Execute SELECT queries and data retrieval operations') and distinguishes it from sibling tools like 'pg_execute_mutation' by emphasizing read-only operations. It explicitly mentions the supported operations (select/count/exists) and provides concrete examples.

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?

The description provides clear context about when to use this tool ('Execute SELECT queries and data retrieval operations') and implies when not to use it (for mutations, which would be handled by 'pg_execute_mutation'). However, it doesn't explicitly name alternatives or provide exclusion criteria beyond the operation types.

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

pg_execute_sqlA

Execute arbitrary SQL statements - sql="ANY_VALID_SQL" with optional parameters and transaction support. Examples: sql="CREATE INDEX ...", sql="WITH complex_cte AS (...) SELECT ...", transactional=true

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
sqlYesSQL statement to execute (can be any valid PostgreSQL SQL)
parametersNoParameter values for prepared statement placeholders ($1, $2, etc.)
expectRowsNoWhether to expect rows back (false for statements like CREATE, DROP, etc.)
timeoutNoQuery timeout in milliseconds
transactionalNoWhether to wrap in a transaction

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only mentions transaction support. It doesn't disclose critical behavioral traits like whether this can execute destructive operations (DROP, DELETE), authentication requirements, rate limits, error handling, or what happens when expectRows mismatches query type.

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

Conciseness5/5

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

The description is efficiently structured in a single sentence with embedded examples, front-loading the core purpose. Every element (arbitrary SQL, parameter support, transaction support, examples) earns its place without redundancy.

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

Completeness2/5

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

For a powerful SQL execution tool with 6 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error behavior, security implications, or how parameters interact (e.g., transactional with expectRows). The complexity demands more complete guidance.

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 parameters thoroughly. The description adds minimal value by mentioning 'optional parameters and transaction support' and providing examples that hint at sql parameter usage, but doesn't add meaningful semantics beyond what the schema provides.

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 clearly states the verb ('Execute') and resource ('arbitrary SQL statements'), with specific examples showing the scope. It distinguishes from siblings like pg_execute_query and pg_execute_mutation by emphasizing 'arbitrary' SQL capability.

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?

The description provides clear context with examples (CREATE INDEX, WITH complex_cte) and mentions transactional support, but doesn't explicitly state when to use this vs. specialized siblings like pg_execute_query for read-only operations or pg_execute_mutation for write operations.

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

pg_export_table_dataC

Export table data to JSON or CSV format

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNo
tableNameYes
outputPathYesabsolute path to save the exported data
whereNo
limitNo
formatNojson

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but provides minimal behavioral context. It mentions output formats but doesn't disclose critical behaviors like: whether this requires write permissions to the output path, if it overwrites existing files, performance implications for large tables, authentication needs via connectionString, or error handling. The description doesn't contradict annotations (none exist), but fails to address important operational aspects.

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

Conciseness5/5

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

Extremely concise single sentence that front-loads the core purpose. Every word earns its place with no redundancy or unnecessary elaboration. The structure is optimal for a basic description.

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

Completeness2/5

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

For a 6-parameter tool with no annotations and no output schema, the description is inadequate. It doesn't explain what the tool returns (success/failure indicators, file metadata), doesn't cover important behavioral aspects (permissions, file overwriting, error conditions), and leaves most parameters unexplained. The conciseness comes at the cost of completeness.

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

Parameters2/5

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

Schema description coverage is only 17% (1 of 6 parameters has a description). The description adds minimal value beyond the schema - it mentions JSON/CSV formats (covered by the enum) but doesn't explain parameter semantics like what 'where' clause syntax to use, how 'limit' interacts with filtering, or the purpose of 'connectionString' beyond being a string. It doesn't compensate for the low schema coverage.

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?

The description clearly states the action ('Export') and resource ('table data') with specific output formats ('JSON or CSV format'). It distinguishes from siblings like pg_execute_query (which returns results directly) by focusing on file export, but doesn't explicitly differentiate from pg_copy_between_databases (which might also involve data movement).

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. It doesn't mention when to choose JSON vs CSV, when filtering/limiting is appropriate, or how it differs from siblings like pg_execute_query (which might return data without file export) or pg_copy_between_databases (which copies between databases).

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

pg_import_table_dataC

Import data from JSON or CSV file into a table

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNo
tableNameYes
inputPathYesabsolute path to the file to import
truncateFirstNo
formatNojson
delimiterNo

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the import action but fails to describe critical behaviors: whether it overwrites existing data (hinted by 'truncateFirst' parameter but not explained), authentication needs (implied by 'connectionString' but not stated), error handling, or output format. This leaves significant gaps for a mutation tool.

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

Conciseness5/5

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

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part ('Import data from JSON or CSV file into a table') contributes directly to understanding the tool's function, making it appropriately concise.

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

Completeness2/5

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

For a mutation tool with 6 parameters, low schema coverage (17%), no annotations, and no output schema, the description is insufficient. It lacks details on behavior (e.g., data overwriting, error cases), parameter usage, and comparison to siblings, leaving the agent with inadequate context to use the tool effectively.

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 low (17%), with only 'inputPath' documented. The description adds minimal value by mentioning JSON/CSV formats, which aligns with the 'format' enum, but doesn't explain other parameters like 'connectionString', 'truncateFirst', or 'delimiter'. It partially compensates for the coverage gap but leaves most parameters semantically unclear.

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?

The description clearly states the action ('Import data') and resource ('from JSON or CSV file into a table'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like pg_export_table_data or pg_copy_between_databases, which would require more specific context about when to choose import vs. other data movement operations.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., table must exist), compare to siblings like pg_copy_between_databases for database-to-database transfers, or specify scenarios where import is preferred over direct SQL execution via pg_execute_mutation.

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

pg_manage_commentsA

Manage PostgreSQL object comments - get, set, remove comments on tables, columns, functions, and other database objects. Examples: operation="get" with objectType="table", objectName="users", operation="set" with comment text, operation="bulk_get" for discovery

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get (retrieve comments), set (add/update comment), remove (delete comment), bulk_get (discovery mode)
objectTypeNoType of database object (required for get/set/remove)
objectNameNoName of the object (required for get/set/remove)
schemaNoSchema name (defaults to public, required for most object types)
columnNameNoColumn name (required when objectType is "column")
commentNoComment text (required for set operation)
includeSystemObjectsNoInclude system objects in bulk_get (defaults to false)
filterObjectTypeNoFilter by object type in bulk_get operation

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the core operations (get, set, remove, bulk_get) and provides examples, but doesn't mention important behavioral aspects like authentication requirements (connection string handling), error conditions, or whether operations are transactional/reversible. The examples help but don't fully compensate for the lack of annotation coverage.

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?

The description is appropriately sized with two sentences: one stating the purpose and scope, and another providing concrete examples. It's front-loaded with the core functionality and uses the examples efficiently to illustrate usage without unnecessary elaboration.

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

Completeness3/5

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

For a tool with 9 parameters, no annotations, and no output schema, the description is somewhat incomplete. While it covers the basic purpose and provides examples, it doesn't address important contextual aspects like return values (especially critical with no output schema), error handling, or the relationship between parameters (e.g., which parameters are required for which operations beyond the schema's 'required' field).

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?

With 100% schema description coverage, the schema already documents all 9 parameters thoroughly. The description adds minimal value beyond what's in the schema - it mentions 'operation' examples and 'objectType' examples but doesn't provide additional semantic context about parameter interactions or usage patterns beyond what the schema descriptions already state.

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 clearly states the tool's purpose with specific verbs ('get, set, remove') and resources ('PostgreSQL object comments'), and distinguishes it from siblings by focusing exclusively on comment management rather than broader database operations like query execution, user management, or constraint handling.

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?

The description provides clear context for when to use the tool (managing comments on various database objects) and includes examples that illustrate different operations. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools for overlapping functionality.

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

pg_manage_constraintsB

Manage PostgreSQL constraints - get, create foreign keys, drop foreign keys, create constraints, drop constraints. Examples: operation="get" to list constraints, operation="create_fk" with constraintName, tableName, columnNames, referencedTable, referencedColumns

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get (list constraints), create_fk (foreign key), drop_fk (drop foreign key), create (constraint), drop (constraint)
schemaNoSchema name (defaults to public)
constraintNameNoConstraint name (required for create_fk/drop_fk/create/drop)
tableNameNoTable name (optional filter for get, required for create_fk/drop_fk/create/drop)
constraintTypeNoFilter by constraint type (for get operation)
columnNamesNoColumn names in the table (required for create_fk)
referencedTableNoReferenced table name (required for create_fk)
referencedColumnsNoReferenced column names (required for create_fk)
referencedSchemaNoReferenced table schema (for create_fk, defaults to same as table schema)
onUpdateNoON UPDATE action (for create_fk)
onDeleteNoON DELETE action (for create_fk)
constraintTypeCreateNoType of constraint to create (for create operation)
checkExpressionNoCheck expression (for create operation with check constraints)
deferrableNoMake constraint deferrable (for create_fk/create operations)
initiallyDeferredNoInitially deferred (for create_fk/create operations)
ifExistsNoInclude IF EXISTS clause (for drop_fk/drop operations)
cascadeNoInclude CASCADE clause (for drop_fk/drop operations)

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions operations but fails to describe critical behavioral traits: whether operations are read-only or destructive (e.g., 'drop' likely destroys data), permission requirements, transaction handling, error behavior, or rate limits. The description only lists operations without behavioral context, leaving significant gaps for a tool with potentially destructive actions.

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?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, followed by examples. It avoids redundancy and wastes no words, though the example could be more structured. For a tool with 18 parameters, this brevity is efficient, but it sacrifices completeness for conciseness.

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

Completeness2/5

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

Given the tool's high complexity (18 parameters, multiple operations including destructive ones), no annotations, and no output schema, the description is incomplete. It lacks essential context: behavioral risks (e.g., data loss from 'drop'), permission needs, error handling, and output format. The examples help but don't compensate for the missing safety and operational guidance required for such a multifaceted 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%, providing a strong baseline. The description adds minimal parameter semantics beyond the schema: it mentions 'operation="get" to list constraints' and 'operation="create_fk" with constraintName, tableName, columnNames, referencedTable, referencedColumns,' which slightly clarifies usage but doesn't add meaningful syntax, format, or interaction details that aren't already in the schema's parameter descriptions.

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?

The description clearly states the tool's purpose: 'Manage PostgreSQL constraints - get, create foreign keys, drop foreign keys, create constraints, drop constraints.' This specifies the verb ('manage') and resource ('PostgreSQL constraints') with enumeration of specific operations. It distinguishes from siblings by focusing on constraints rather than other database objects like indexes, functions, or users, though it doesn't explicitly contrast with them.

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

Usage Guidelines3/5

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

The description provides implied usage through examples: 'Examples: operation="get" to list constraints, operation="create_fk" with constraintName, tableName, columnNames, referencedTable, referencedColumns.' This gives basic guidance on when to use certain operations but lacks explicit when/when-not rules, prerequisites, or comparisons to alternative tools like pg_manage_indexes or pg_execute_sql for similar tasks.

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

pg_manage_functionsA

Manage PostgreSQL functions - get, create, or drop functions with a single tool. Examples: operation="get" to list functions, operation="create" with functionName="test_func", parameters="" (empty for no params), returnType="TEXT", functionBody="SELECT 'Hello'"

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation to perform: get (list/info), create (new function), or drop (remove function)
functionNameNoName of the function (required for create/drop, optional for get to filter)
schemaNoSchema name (defaults to public)
parametersNoFunction parameters - required for create operation, required for drop when function is overloaded. Use empty string "" for functions with no parameters
returnTypeNoReturn type of the function (required for create operation)
functionBodyNoFunction body code (required for create operation)
languageNoFunction language (defaults to plpgsql for create)
volatilityNoFunction volatility (defaults to VOLATILE for create)
securityNoFunction security context (defaults to INVOKER for create)
replaceNoWhether to replace the function if it exists (for create operation)
ifExistsNoWhether to include IF EXISTS clause (for drop operation)
cascadeNoWhether to include CASCADE clause (for drop operation)

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the three operations (get, create, drop), it doesn't disclose critical behavioral traits: whether create/drop operations are destructive, what permissions are required, whether operations are transactional, or what happens on errors. The examples show basic usage but lack comprehensive behavioral context for a multi-operation 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?

The description is appropriately sized with two sentences: a clear purpose statement followed by specific examples. It's front-loaded with the core functionality and uses examples efficiently to illustrate usage. Every sentence serves a purpose, though the example could be slightly more structured.

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

Completeness2/5

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

For a complex tool with 13 parameters, three distinct operations (including destructive create/drop), no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns for different operations, error handling, transaction behavior, or the implications of create/drop operations. The examples help but don't compensate for the missing behavioral context needed for safe use.

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 13 parameters thoroughly. The description adds minimal value beyond the schema by mentioning examples like 'parameters="" (empty for no params)', but doesn't provide additional semantic context about parameter interactions or operation-specific requirements that aren't already in the schema descriptions.

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 clearly states the tool's purpose: 'Manage PostgreSQL functions - get, create, or drop functions with a single tool.' It specifies the exact operations (get, create, drop) and the resource (PostgreSQL functions), distinguishing it from siblings like pg_manage_indexes or pg_manage_triggers that handle different database objects.

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?

The description provides clear context for when to use this tool through examples: 'operation="get" to list functions, operation="create" with functionName="test_func"...' It implicitly suggests this is for PostgreSQL function management rather than other database operations, but doesn't explicitly state when not to use it or name alternatives among siblings.

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

pg_manage_indexesB

Manage PostgreSQL indexes - get, create, drop, reindex, and analyze usage with a single tool. Examples: operation="get" to list indexes, operation="create" with indexName, tableName, columns, operation="analyze_usage" for performance analysis

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get (list indexes), create (new index), drop (remove index), reindex (rebuild), analyze_usage (find unused/duplicate)
schemaNoSchema name (defaults to public)
tableNameNoTable name (optional for get/analyze_usage, required for create)
indexNameNoIndex name (required for create/drop)
includeStatsNoInclude usage statistics (for get operation)
columnsNoColumn names for the index (required for create operation)
uniqueNoCreate unique index (for create operation)
concurrentNoCreate/drop index concurrently (for create/drop operations)
methodNoIndex method (for create operation, defaults to btree)
whereNoWHERE clause for partial index (for create operation)
ifNotExistsNoInclude IF NOT EXISTS clause (for create operation)
ifExistsNoInclude IF EXISTS clause (for drop operation)
cascadeNoInclude CASCADE clause (for drop operation)
targetNoTarget name for reindex (required for reindex operation)
typeNoType of target for reindex (required for reindex operation)
minSizeBytesNoMinimum index size in bytes (for analyze_usage operation)
showUnusedNoInclude unused indexes (for analyze_usage operation)
showDuplicatesNoDetect duplicate indexes (for analyze_usage operation)

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral disclosure. It mentions operations but doesn't cover critical aspects like authentication needs (connection string handling), potential data loss from drop/reindex, performance impact of concurrent operations, or error handling. The examples add some context but insufficient for a complex 19-parameter 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?

The description is appropriately sized with two sentences: a clear purpose statement followed by specific examples. It's front-loaded with the core functionality, though the example formatting could be slightly cleaner. Every sentence adds value without redundancy.

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

Completeness2/5

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

For a complex tool with 19 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain return values, error conditions, or behavioral nuances across different operations. While the schema provides parameter documentation, the description fails to offer the holistic guidance needed for proper tool selection and invocation.

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 baseline is 3. The description adds marginal value by mentioning examples like 'operation="create" with indexName, tableName, columns' and 'operation="analyze_usage" for performance analysis,' but doesn't provide additional semantic context beyond what's already documented in the comprehensive schema descriptions.

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 clearly states the tool's purpose: 'Manage PostgreSQL indexes - get, create, drop, reindex, and analyze usage with a single tool.' It specifies the exact operations and distinguishes this multi-operation index management tool from its siblings, which focus on other database aspects like constraints, functions, or queries.

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

Usage Guidelines3/5

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

The description provides implied usage through examples (e.g., 'operation="get" to list indexes'), but lacks explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like database connection requirements or differentiate from sibling tools like pg_manage_constraints for related tasks.

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

pg_manage_queryA

Manage PostgreSQL query analysis and performance - operation="explain" for EXPLAIN plans, operation="get_slow_queries" for slow query analysis, operation="get_stats" for query statistics, operation="reset_stats" for clearing statistics

ParametersJSON Schema
NameRequiredDescriptionDefault
operationYesOperation: explain (EXPLAIN/EXPLAIN ANALYZE query), get_slow_queries (find slow queries from pg_stat_statements), get_stats (query statistics with cache hit ratios), reset_stats (reset pg_stat_statements)
connectionStringNo
queryNoSQL query to explain (required for explain operation)
analyzeNoUse EXPLAIN ANALYZE - actually executes the query (for explain operation)
buffersNoInclude buffer usage information (for explain operation)
verboseNoInclude verbose output (for explain operation)
costsNoInclude cost estimates (for explain operation)
formatNoOutput format (for explain operation)json
limitNoNumber of slow queries to return (for get_slow_queries operation)
minDurationNoMinimum average duration in milliseconds (for get_slow_queries operation)
orderByNoSort order (for get_slow_queries and get_stats operations)mean_time
includeNormalizedNoInclude normalized query text (for get_slow_queries operation)
minCallsNoMinimum number of calls (for get_stats operation)
queryPatternNoFilter queries containing this pattern (for get_stats operation)
queryIdNoSpecific query ID to reset (for reset_stats operation, resets all if not provided)

TDQS

A3.6/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but provides minimal behavioral disclosure. It mentions what each operation does but doesn't cover important behavioral aspects like: whether operations require specific permissions, if reset_stats is destructive/irreversible, performance implications of analyze=true, rate limits, or what the output looks like. For a tool with potentially destructive operations (reset_stats) and complex behaviors, this is insufficient.

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

Conciseness5/5

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

The description is extremely concise and front-loaded: a single sentence efficiently communicates the tool's scope and all four operations. Every word earns its place with zero waste or redundancy. The structure clearly presents the operation-to-purpose mapping in a compact format.

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

Completeness2/5

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

Given the tool's complexity (15 parameters, 4 distinct operations including potentially destructive reset_stats), no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, doesn't warn about the destructive nature of reset_stats, doesn't mention prerequisites like pg_stat_statements extension, and provides minimal guidance on parameter interactions across different operations.

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 high (93%), so the baseline is 3. The description adds minimal value beyond the schema - it maps operation values to their purposes but doesn't explain parameter interactions or provide additional context about when to use specific parameters. The schema already documents most parameters well, so the description doesn't significantly enhance understanding.

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 clearly states the tool's purpose: 'Manage PostgreSQL query analysis and performance' with specific operations listed (explain, get_slow_queries, get_stats, reset_stats). It distinguishes from siblings like pg_execute_query (execution) and pg_analyze_database (database-wide analysis) by focusing specifically on query-level performance analysis.

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?

The description provides clear context for when to use each operation (e.g., 'operation="explain" for EXPLAIN plans'), but doesn't explicitly state when NOT to use this tool or mention specific alternatives among siblings. The operational breakdown gives good guidance on selecting the right operation within this tool.

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

pg_manage_rlsB

Manage PostgreSQL Row-Level Security - enable/disable RLS and manage policies. Examples: operation="enable" with tableName="users", operation="create_policy" with tableName, policyName, using, check

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: enable/disable RLS, create_policy, edit_policy, drop_policy, get_policies
tableNameNoTable name (required for enable/disable/create_policy/edit_policy/drop_policy, optional filter for get_policies)
schemaNoSchema name (defaults to public)
policyNameNoPolicy name (required for create_policy/edit_policy/drop_policy)
usingNoUSING expression for policy (required for create_policy, optional for edit_policy)
checkNoWITH CHECK expression for policy (optional for create_policy/edit_policy)
commandNoCommand the policy applies to (for create_policy)
roleNoRole the policy applies to (for create_policy)
replaceNoWhether to replace policy if exists (for create_policy)
rolesNoList of roles for policy (for edit_policy)
ifExistsNoInclude IF EXISTS clause (for drop_policy)

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions operations but doesn't describe critical behavioral traits: whether these are destructive changes (e.g., dropping policies), authentication requirements (connection string usage), error handling, or side effects. The examples hint at parameter usage but don't explain system impact or safety considerations.

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?

The description is appropriately sized with two sentences: a clear purpose statement followed by concrete examples. It's front-loaded with the core functionality and uses the examples efficiently to illustrate usage without unnecessary elaboration. Every sentence serves a functional purpose.

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

Completeness2/5

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

Given the tool's complexity (12 parameters, multiple operations including potentially destructive ones like 'drop_policy'), no annotations, and no output schema, the description is incomplete. It doesn't address critical context: what the tool returns, error conditions, permission requirements, or the safety profile of different operations. For a database management tool with mutation capabilities, this creates significant gaps for an AI agent.

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 12 parameters thoroughly. The description adds minimal value beyond the schema by listing example parameter combinations in the examples clause, but doesn't provide additional semantic context like parameter interdependencies or operational constraints not captured in 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?

The description clearly states the tool's purpose: 'Manage PostgreSQL Row-Level Security - enable/disable RLS and manage policies.' It specifies the verb ('manage') and resource ('PostgreSQL Row-Level Security') with concrete operations. However, it doesn't explicitly differentiate from sibling tools like pg_manage_constraints or pg_manage_schema, which also manage PostgreSQL database objects.

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

Usage Guidelines3/5

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

The description provides implied usage through examples ('Examples: operation="enable" with tableName="users", operation="create_policy" with tableName, policyName, using, check'), showing when to use specific operations. However, it lacks explicit guidance on when to choose this tool over alternatives (e.g., vs. pg_manage_constraints for security vs. constraint management) or prerequisites like database permissions.

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

pg_manage_schemaB

Manage PostgreSQL schema - get schema info, create/alter tables, manage enums. Examples: operation="get_info" for table lists, operation="create_table" with tableName and columns, operation="get_enums" to list enums, operation="create_enum" with enumName and values

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get_info (schema/table info), create_table (new table), alter_table (modify table), get_enums (list ENUMs), create_enum (new ENUM)
tableNameNoTable name (optional for get_info to get specific table info, required for create_table/alter_table)
schemaNoSchema name (defaults to public)
columnsNoColumn definitions (required for create_table)
operationsNoAlter operations (required for alter_table)
enumNameNoENUM name (optional for get_enums to filter, required for create_enum)
valuesNoENUM values (required for create_enum)
ifNotExistsNoInclude IF NOT EXISTS clause (for create_enum)

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions operations but doesn't clarify critical traits: whether operations are read-only or destructive (e.g., create_table alters database state), authentication needs (connectionString is optional but implications unclear), error handling, or transaction behavior. The examples add some context but leave major gaps for a multi-operation tool with potential mutations.

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?

The description is efficiently structured in two sentences: a purpose statement followed by operation examples. Each example earns its place by illustrating parameter usage. However, the examples are somewhat terse and could be more clearly formatted, slightly reducing readability.

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

Completeness2/5

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

Given the tool's complexity (9 parameters, multiple operations including mutations), no annotations, and no output schema, the description is incomplete. It doesn't address return values, error conditions, side effects, or prerequisites (e.g., database permissions). For a schema management tool with potential destructive operations, this leaves significant gaps for an AI agent.

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 9 parameters thoroughly. The description adds minimal value beyond the schema: it mentions operation examples and ties some parameters to operations (e.g., tableName for create_table), but doesn't explain semantics like column structure details or ifNotExists behavior. This meets the baseline for high schema coverage.

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?

The description clearly states the tool manages PostgreSQL schema with specific operations (get schema info, create/alter tables, manage enums). It distinguishes from siblings like pg_execute_query or pg_manage_indexes by focusing on schema operations rather than queries, indexes, or other database aspects. However, it doesn't explicitly contrast with all siblings like pg_manage_constraints or pg_manage_functions.

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

Usage Guidelines3/5

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

The description provides examples that imply when to use different operations (e.g., operation='get_info' for table lists), giving some contextual guidance. However, it lacks explicit when-not-to-use advice or clear alternatives among siblings (e.g., when to use pg_manage_constraints instead for constraint operations). The examples serve as usage hints but aren't comprehensive guidelines.

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

pg_manage_triggersA

Manage PostgreSQL triggers - get, create, drop, and enable/disable triggers. Examples: operation="get" to list triggers, operation="create" with triggerName, tableName, functionName, operation="drop" with triggerName and tableName, operation="set_state" with triggerName, tableName, enable

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: get (list triggers), create (new trigger), drop (remove trigger), set_state (enable/disable trigger)
schemaNoSchema name (defaults to public)
tableNameNoTable name (optional filter for get, required for create/drop/set_state)
triggerNameNoTrigger name (required for create/drop/set_state)
functionNameNoFunction name (required for create operation)
timingNoTrigger timing (for create operation, defaults to AFTER)
eventsNoTrigger events (for create operation, defaults to ["INSERT"])
forEachNoFOR EACH ROW or STATEMENT (for create operation, defaults to ROW)
whenNoWHEN clause condition (for create operation)
replaceNoWhether to replace trigger if exists (for create operation)
ifExistsNoInclude IF EXISTS clause (for drop operation)
cascadeNoInclude CASCADE clause (for drop operation)
enableNoWhether to enable the trigger (required for set_state operation)

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions operations like create, drop, and set_state, which imply mutations, but fails to describe critical behaviors such as permissions needed, whether changes are reversible, error handling, or side effects (e.g., cascade drops). This leaves significant gaps for a tool with multiple mutation operations.

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?

The description is front-loaded with the core purpose and includes examples that are directly relevant. However, the example list is somewhat lengthy and could be streamlined. Most sentences earn their place by clarifying usage, but there is minor redundancy in parameter mentions.

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

Completeness2/5

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

Given the complexity (14 parameters, multiple mutation operations) and lack of annotations and output schema, the description is incomplete. It does not cover behavioral aspects like authentication needs, rate limits, or return formats, which are crucial for safe and effective use. This is inadequate for a tool with such scope and potential impact.

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 14 parameters thoroughly. The description adds minimal value by listing some parameters in examples (e.g., triggerName, tableName for operations), but does not provide additional semantics beyond what the schema offers. This meets the baseline for high schema coverage.

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 clearly states the tool manages PostgreSQL triggers with specific verbs (get, create, drop, enable/disable) and distinguishes it from siblings like pg_manage_functions or pg_manage_constraints by focusing exclusively on triggers. It provides concrete examples of operations, making the purpose highly specific and actionable.

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?

The description offers clear context on when to use each operation (e.g., operation='get' to list triggers, operation='create' with specific parameters), but it does not explicitly state when not to use this tool or mention alternatives among siblings. The examples provide implicit guidance, though explicit exclusions or comparisons are missing.

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

pg_manage_usersB

Manage PostgreSQL users and permissions - create, drop, alter users, grant/revoke permissions. Examples: operation="create" with username="testuser", operation="grant" with username, permissions, target, targetType

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNoPostgreSQL connection string (optional)
operationYesOperation: create (new user), drop (remove user), alter (modify user), grant (permissions), revoke (permissions), get_permissions (view permissions), list (all users)
usernameNoUsername (required for create/drop/alter/grant/revoke/get_permissions, optional filter for list)
passwordNoPassword for the user (for create operation)
superuserNoGrant superuser privileges (for create/alter operations)
createdbNoAllow user to create databases (for create/alter operations)
createroleNoAllow user to create roles (for create/alter operations)
loginNoAllow user to login (for create/alter operations)
replicationNoAllow replication privileges (for create/alter operations)
connectionLimitNoMaximum number of connections (for create/alter operations)
validUntilNoPassword expiration date YYYY-MM-DD (for create/alter operations)
inheritNoInherit privileges from parent roles (for create/alter operations)
ifExistsNoInclude IF EXISTS clause (for drop operation)
cascadeNoInclude CASCADE to drop owned objects (for drop/revoke operations)
permissionsNoPermissions to grant/revoke: ["SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "ALL"]
targetNoTarget object name (for grant/revoke operations)
targetTypeNoType of target object (for grant/revoke operations)
withGrantOptionNoAllow user to grant these permissions to others (for grant operation)
schemaNoFilter by schema (for get_permissions operation)
includeSystemRolesNoInclude system roles (for list operation)

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It mentions operations like 'create' and 'drop' which imply mutations, but doesn't clarify critical behaviors such as authentication requirements, whether operations are reversible, potential side effects (e.g., cascade deletions), or error handling. For a complex tool with 20 parameters and no annotations, this is a significant gap.

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?

The description is appropriately sized and front-loaded, starting with the core purpose and immediately providing concrete examples. The two sentences are efficient with zero waste, though it could be slightly more structured by separating purpose from examples. Every sentence earns its place by clarifying the tool's scope.

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

Completeness2/5

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

Given the tool's high complexity (20 parameters, multiple operations including destructive ones like 'drop'), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like safety warnings, permission requirements, or expected return formats. For a multi-operation tool with potential destructive actions, more contextual guidance is needed.

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 20 parameters thoroughly. The description adds marginal value by listing example operations ('create', 'grant') and mentioning a few parameters (username, permissions, target, targetType) in examples, but doesn't provide additional semantic context beyond what's in the schema. This meets the baseline for high schema coverage.

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 clearly states the tool's purpose with specific verbs ('manage', 'create', 'drop', 'alter', 'grant/revoke') and resources ('PostgreSQL users and permissions'). It distinguishes itself from sibling tools like pg_execute_query or pg_manage_schema by focusing exclusively on user management operations rather than general queries or schema objects.

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

Usage Guidelines3/5

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

The description provides implied usage through examples ('operation="create" with username="testuser"'), but lacks explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., database connection requirements) or compare with sibling tools like pg_manage_query for permission-related queries, leaving the agent to infer appropriate contexts.

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

pg_monitor_databaseC

Get real-time monitoring information for a PostgreSQL database

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringNo
includeTablesNo
includeQueriesNo
includeLocksNo
includeReplicationNo
alertThresholdsNoAlert thresholds

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Get real-time monitoring information,' implying a read-only operation, but doesn't specify whether this requires specific permissions, has rate limits, returns structured data, or involves any side effects. For a monitoring tool with 6 parameters and no annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the complexity (6 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't address the tool's behavior, output format, or parameter usage, which are crucial for a monitoring tool with multiple configuration options. This leaves significant gaps for an AI agent to understand how to invoke it effectively.

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

Parameters2/5

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

Schema description coverage is low at 17%, with only the 'alertThresholds' object having descriptions. The description doesn't add any meaning beyond the schema, such as explaining what 'includeTables' or 'connectionString' entail in the context of monitoring. It fails to compensate for the poor schema coverage, leaving most parameters semantically unclear.

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?

The description clearly states the verb ('Get') and resource ('real-time monitoring information for a PostgreSQL database'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from siblings like 'pg_analyze_database' or 'pg_debug_database', which might also provide database insights, so it misses full sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'pg_analyze_database' or 'pg_debug_database'. It lacks context about prerequisites, such as needing a valid connection string, or exclusions, leaving the agent to infer usage based on the name alone.

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. Dates show when Glama detected each change.

  1. 18 tool updates
    • First observedpg_analyze_database
    • First observedpg_copy_between_databases
    • First observedpg_debug_database
    • First observedpg_execute_mutation
    • First observedpg_execute_query
    • First observedpg_execute_sql
    • First observedpg_export_table_data
    • First observedpg_import_table_data
    • First observedpg_manage_comments
    • First observedpg_manage_constraints
    • First observedpg_manage_functions
    • First observedpg_manage_indexes
    • First observedpg_manage_query
    • First observedpg_manage_rls
    • First observedpg_manage_schema
    • First observedpg_manage_triggers
    • First observedpg_manage_users
    • First observedpg_monitor_database

TDQS

B3.2/5.0
Disambiguation4/5

Most tools have distinct purposes targeting specific PostgreSQL management areas (e.g., schema, indexes, constraints), but some overlap exists. For example, pg_execute_mutation and pg_execute_sql both handle data modifications, and pg_manage_query's performance analysis overlaps with pg_analyze_database. However, descriptions help clarify boundaries, preventing major confusion.

Naming Consistency5/5

All tools follow a consistent 'pg_verb_noun' pattern with snake_case throughout (e.g., pg_manage_schema, pg_execute_query). This predictable naming convention makes it easy for agents to identify tool purposes and maintain readability across the set.

Tool Count4/5

With 18 tools, the count is slightly high but reasonable for a comprehensive PostgreSQL management server. It covers a wide range of database operations from queries to administration, though it might feel heavy for simpler use cases. Each tool appears to earn its place by addressing specific PostgreSQL features.

Completeness5/5

The tool set provides extensive coverage of PostgreSQL management, including CRUD operations (via pg_execute_mutation/query), schema management, performance monitoring, security (RLS, users), and data import/export. No obvious gaps are present; agents can handle full database lifecycles and advanced features without dead ends.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server that enables interaction with PostgreSQL databases for analyzing setups, debugging issues, managing schemas, migrating data, and monitoring performance.
    1
    19
    1
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    A Model Context Protocol server providing dual transport (HTTP and Stdio) access to PostgreSQL databases, allowing AI assistants to query databases and fetch schema information through natural language.
    101
    31
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    An open source Model Context Protocol server for PostgreSQL that provides database health analysis, index tuning, query plan exploration, and safe SQL execution for AI agents throughout the development process.
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server for PostgreSQL databases that enables AI agents to connect, query, and explore multiple databases with schema discovery and extension context.
    540
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/HenkDz/postgresql-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server