Skip to main content
Glama
Teja-sudo

postgres-mcp-server

by Teja-sudo

column_profile

Profiles a column in a PostgreSQL table: returns null percentage, distinct count, top-K values, min/max, and type-aware stats like average, stddev, or length distribution. Uses sampling for large tables to bound latency.

Instructions

Single-pass profile per column: null %, distinct count, top-K values with frequencies, min/max, and type-aware stats (avg/stddev for numeric, length distribution for text, range for temporal). Uses TABLESAMPLE BERNOULLI for tables larger than sample_threshold (default 1M rows) to keep latency bounded. Replaces a dozen separate exploratory queries an AI agent would otherwise run to understand a column's shape.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaNopublic
columnsNoSpecific columns to profile (default: all up to 30).
sample_percentNo
sample_thresholdNo
top_kNoTop-K values per column (max 25).
serverNo
databaseNo
override_schemaNo
Behavior4/5

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

With no annotations, the description carries full burden. It discloses use of TABLESAMPLE BERNOULLI for large tables, single-pass computation, and latency bounding. It does not cover permissions, locking, or sampling accuracy trade-offs, but the core behavior is transparent.

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 paragraph of three sentences, concise and front-loaded with key functionality. It could be slightly more structured with bullet points, but it is efficient and free of fluff.

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 no output schema and 9 parameters, the description omits crucial details like return format, default column limit (30), and full parameter roles. While it explains the algorithm, it is not complete enough for an agent to use it without guessing return structure.

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 coverage is only 22%, and the description adds limited parameter explanation. It mentions sample_threshold and sample_percent implicitly via sampling algorithm, but parameters like server, database, override_schema are undocumented. The description does not sufficiently compensate for the schema gaps.

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 profiles columns in a table, listing specific statistics (null %, distinct count, top-K, etc.) and explains it replaces multiple exploratory queries, making the purpose unambiguous and distinct from tools like describe_table.

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 implies usage for understanding column shape efficiently, stating it replaces a dozen separate exploratory queries. However, it doesn't explicitly mention when not to use or compare to specific sibling tools, but the context is clear.

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

Install Server

Other Tools

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/Teja-sudo/postgres-mcp-server'

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