postgres-mcp-server
Server Quality Checklist
Latest release: v1.0.0
- Disambiguation5/5
Each tool targets a distinct function: listing tables, describing schema, executing read-only queries, explaining query plans, retrieving database stats, and executing write operations. There is no overlap or ambiguity between tool purposes.
Naming Consistency5/5All tool names follow a consistent verb_noun pattern in snake_case (list_, describe_, read_, explain_, get_, execute_). The naming is uniform and predictable.
Tool Count5/5With 6 tools, the set is concise and well-scoped for a PostgreSQL server, covering the essential operations without unnecessary bloat or sparse coverage.
Completeness5/5The tool surface covers the full lifecycle of database interaction: discovery, schema inspection, read queries, write queries, query planning, and server statistics. No critical gaps are apparent for the intended purpose.
Average 4/5 across 6 of 6 tools scored.
See the Tool Scores section below for per-tool breakdowns.
- No community issues in the last 6 months
- 9 commits in the last 12 weeks
- No stable releases found
- No critical vulnerability alerts
- No high-severity vulnerability alerts
- No code scanning findings
- CI status not available
This repository is licensed under BSD 3-Clause.
This repository includes a README.md file.
No tool usage detected in the last 30 days. Usage tracking helps demonstrate server value.
Tip: use the "Try in Browser" feature on the server page to seed initial usage.
Add a glama.json file to provide metadata about your server.
If you are the author, simply .
If the server belongs to an organization, first add
glama.jsonto the root of your repository:{ "$schema": "https://glama.ai/mcp/schemas/server.json", "maintainers": [ "your-github-username" ] }Then . Browse examples.
Add related servers to improve discoverability.
How to sync the server with GitHub?
Servers are automatically synced at least once per day, but you can also sync manually at any time to instantly update the server profile.
To manually sync the server, click the "Sync Server" button in the MCP server admin interface.
How is the quality score calculated?
The overall quality score combines two components: Tool Definition Quality (70%) and Server Coherence (30%).
Tool Definition Quality measures how well each tool describes itself to AI agents. Every tool is scored 1–5 across six dimensions: Purpose Clarity (25%), Usage Guidelines (20%), Behavioral Transparency (20%), Parameter Semantics (15%), Conciseness & Structure (10%), and Contextual Completeness (10%). The server-level definition quality score is calculated as 60% mean TDQS + 40% minimum TDQS, so a single poorly described tool pulls the score down.
Server Coherence evaluates how well the tools work together as a set, scoring four dimensions equally: Disambiguation (can agents tell tools apart?), Naming Consistency, Tool Count Appropriateness, and Completeness (are there gaps in the tool surface?).
Tiers are derived from the overall score: A (≥3.5), B (≥3.0), C (≥2.0), D (≥1.0), F (<1.0). B and above is considered passing.
Tool Scores
- 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 disclosing behavior. It fails to mention that setting 'analyze' to true actually executes the query, which is a significant behavioral trait with potential side effects. It also omits any statement about read-only nature or return format.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that is front-loaded with the action and delivers all essential purpose information with no redundancy or wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness3/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
While the tool is simple and the schema covers both parameters, the absence of annotations and output schema leaves gaps: the description does not explain the side effect of EXPLAIN ANALYZE or describe what the returned plan looks like. It is adequate but not fully complete for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the parameters 'sql' and 'analyze' are already well-documented in the schema. The description adds no additional parameter-level meaning, which aligns with the baseline of 3 for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Execute EXPLAIN') and resource ('a SQL query'), and clearly distinguishes the tool from siblings by naming the diagnostic outputs (cost estimates, join strategies, index usage). It unambiguously identifies what this tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does 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: to inspect query planner cost estimates, join strategies, and index usage. It does not explicitly mention exclusions or alternatives, but the sibling tools (e.g., read_query, execute_query) are implicitly distinct.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior3/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 does describe the contents of the return (columns, data types, constraints, etc.), which is helpful. However, it does not explicitly state that the operation is read-only, nor does it mention any limitations or error behavior. The 'Get' verb implies a safe read, but more transparency would be expected.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that front-loads the main purpose ('Get detailed schema breakdown') and lists the specific items covered. Every word earns its place, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema), the description sufficiently explains the return value by enumerating the schema components. It could benefit from an example or note on error handling for non-existent tables, but for its complexity, it is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% coverage with descriptions for both parameters ('table' and 'schema'). The description does not add additional meaning to the parameters themselves, only restates that it works for a 'specific table or view', which echoes the schema. Thus baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool provides a 'detailed schema breakdown' for 'a specific table or view', listing the exact contents (columns, types, constraints, keys, indexes). This specific verb+resource combination distinguishes it from sibling tools like list_tables (which lists tables) or execute_query (which runs 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/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when one needs schema details for a specific table/view, but it does not explicitly state when to use this tool over alternatives or provide any exclusions. Sibling tools are present, but the description offers no direct comparison, so the usage context is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior4/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 clearly describes a read-only listing operation and discloses that row counts are 'estimated', which signals approximate values. However, it does not explicitly state that the tool is non-destructive or requires no special permissions. Still, the term 'list' implies a safe read operation, and the 'estimated' caveat adds useful behavioral nuance, meriting a score above baseline.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the core purpose ('List all tables, views, and schemas') and immediately follows with the key output details ('estimated row counts and table sizes'). Every word earns its place, with no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, lack of output schema, and no annotations, the description is fairly complete: it states what the tool lists and what accompanying data is returned. The only minor gap is a slight ambiguity over the phrase 'and schemas' (whether schemas are listed as separate objects or just included as context), but this is a small omission in an otherwise adequate description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema already provides 100% description coverage for both parameters: 'schema' (Database schema name, default public) and 'include_views' (Whether to include database views, default true). The tool description does not add any additional meaning beyond the schema, so the baseline score of 3 applies. No enrichment of parameter semantics is present.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'List' and clearly identifies the resource: 'all tables, views, and schemas in the PostgreSQL database'. It also specifies additional output details ('estimated row counts and table sizes'), which distinguishes it from sibling tools like describe_table (which describes a single table) and get_db_stats (which focuses on database stats). This leaves no ambiguity about the tool's function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines2/5Does 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 does not mention that describe_table is more appropriate for inspecting a specific table, or that get_db_stats is useful for broader database statistics. There is no explicit when-to-use or when-not-to-use context, so the agent is left to infer usage solely from the tool name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior3/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of disclosing side effects. It mentions the environment requirement and the mutation nature, but does not detail consequences like irreversibility, potential destructive effects, or return values. This is adequate but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences: the first states the core functionality, the second notes a key prerequisite. No wasted words, and important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool, the description covers purpose, statement types, and an environment requirement. It lacks explicit return-value information, but given the simple interface and sibling context, it's sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage for the sole parameter 'sql', and the description does not add extra meaning beyond the schema. Baseline 3 applies since the schema already documents the parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Execute') and resource ('data modification statements') and explicitly lists statement types (INSERT, UPDATE, DELETE, DDL), which clearly distinguishes it from sibling tools like read_query. The purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for write operations and names a prerequisite (ALLOW_WRITE_QUERIES=true). However, it does not explicitly mention alternatives or state when not to use it, though the write-focused wording makes the context clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior3/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears full responsibility. It implies a read-only operation via 'Retrieve' and specifies the measured metrics, giving useful transparency. However, it omits details like potential performance impact, permission requirements, or output structure, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, tightly packed sentence that front-loads the action and resource, followed by a concise list of metrics. Every word adds value with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple, parameterless diagnostic tool with no output schema, the description adequately conveys the core purpose and key metrics. However, it does not specify details like the ordering or limit of 'top tables' or the exact format of the returned data, leaving minor ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters4/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema confirms this (100% coverage). The baseline for 0 params is 4, and the description correctly focuses on the output without needing to explain parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Retrieve' and clearly identifies the resource as 'database health & performance metrics,' enumerating concrete outputs: database size, top tables by disk usage, active connections, and cache hit ratio. This clearly differentiates it from sibling tools like list_tables or read_query, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context: use this tool when you need database health or performance metrics. It does not explicitly name alternatives or state when not to use it, but the unique purpose within the sibling group is evident.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior4/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It transparently discloses that the query runs inside a DB-level READ ONLY transaction for safety, which is critical behavioral context beyond just saying 'read-only'. It does not detail return format or error handling, but the transaction safety note adds meaningful value.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Conciseness5/5Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loads the primary action, and contains no superfluous words. Every phrase earns its place, including the safety qualifier.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Completeness4/5Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter, no-output-schema tool, the description adequately covers the core purpose and the key safety behavior (READ ONLY transaction). It falls short of explaining return structure or error behavior, but given the simplicity and the read-only guarantee, it is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Parameters3/5Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so per guidelines the baseline is 3. The description does not add extra meaning beyond the schema: the 'sql' parameter is already described as 'The SQL SELECT query to execute', and 'limit' has its default and max documented. The description's emphasis on read-only does not alter parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose5/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb ('Execute') and resource ('read-only SQL query'), and explicitly limits to SELECT, WITH, etc. This distinguishes it from sibling execute_query, which likely handles writes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Usage Guidelines4/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The tool is explicitly described as read-only, making it clear it should be used for queries that do not modify data. It does not explicitly name alternatives or exclusions, but the read-only qualifier provides sufficient guidance compared to the execution-querysibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
GitHub Badge
Glama performs regular codebase and documentation scans to:
- Confirm that the MCP server is working as expected.
- Confirm that there are no obvious security issues.
- Evaluate tool definition quality.
Our badge communicates server capabilities, safety, and installation instructions.
Card Badge
Copy to your README.md:
Score Badge
Copy to your README.md:
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/rajath002/postgres-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server