postgres-mcp-server
Server Quality Checklist
Latest release: v1.0.0
- Disambiguation5/5
Each tool has a distinct role: read-only queries, write operations with explicit transaction control, maintenance commands, and metadata inspection. No two tools could plausibly perform the same task, and the transaction lifecycle is clearly separated.
Naming Consistency5/5All tools follow a consistent verb_prefix pattern (execute_*, list_*, describe_*) in lowercase snake_case, making the API predictable and easy to navigate.
Tool Count5/58 tools is appropriately scoped for a PostgreSQL interaction server, covering query execution, writes, maintenance, transactions, and schema metadata without redundancy.
Completeness5/5The set covers the full lifecycle of SQL execution: reads, writes, transaction commit/rollback, maintenance operations, and essential schema discovery. It lacks some advanced catalog queries, but the core domain is well-covered.
Average 3.9/5 across 8 of 8 tools scored.
See the Tool Scores section below for per-tool breakdowns.
- No community issues in the last 6 months
- No commit activity data available
- No stable releases found
- No critical vulnerability alerts
- No high-severity vulnerability alerts
- No code scanning findings
- CI is passing
This repository is licensed under ISC License.
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?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Usa SQL parametrizado' (uses parameterized SQL), which hints at safe query construction, but it does not state whether the operation is read-only, what permissions are required, or what the response format looks like. This leaves significant behavioral uncertainty.
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 extremely concise: one sentence stating the core function and a short second sentence about parameterized SQL. It is front-loaded with the action and contains no redundant or irrelevant information.
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?
The tool is simple (1 optional param, no output schema), so the description is reasonably complete, but gaps remain. It does not explicitly state what the returned data looks like (e.g., list of table names) or clarify 'visible tables' in terms of permissions or system tables. Given the absence of annotations and output schema, a bit more detail would improve completeness.
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 schema_description_coverage is 100% since the only parameter schema_name is described as 'Nombre del esquema'. The description adds value by explaining that the filter is optional ('opcionalmente filtradas por esquema'), clarifying the parameter's role beyond just its name.
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's function: 'Lista tablas visibles' (lists visible tables), with optional schema filtering. This specific verb+resource distinguishes it from siblings like list_schemas (lists schemas) and describe_table (describes a single table).
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 for listing tables, and the optional schema filter gives context, but it does not explicitly state when to prefer this tool over alternatives such as list_schemas or execute_query. No exclusions or alternative recommendations are provided.
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?
No annotations are provided, so the description carries the full burden. It does disclose that the tool 'Usa SQL parametrizado', which signals safe query construction, and 'describe' implies read-only behavior. However, it does not explicitly state that it makes no modifications, what privileges are required, or the exact format/shape of the returned metadata.
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 consists of two short sentences with no filler. The primary action and target resource are front-loaded, and the note about parameterized SQL adds useful context without bloating the text.
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 two-parameter introspection tool, the description adequately conveys what the tool does and what it returns (column/index/constraint definitions). The lack of an output schema is somewhat mitigated by the explicit mention of the metadata types, though a bit more detail about the exact return structure would make it 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 description coverage is 100%, so both table_name and schema_name are already documented. The tool description adds no additional parameter-specific semantics, but the schema fully covers names and defaults, meeting the baseline.
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 ('describe') and identifies the exact resource ('columnas, índices y constraints de una tabla'), making the tool's function immediately clear. It also distinguishes itself from sibling tools like list_tables and list_schemas by focusing on table structure rather than listing 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/5Does the description explain when to use this tool, when not to, or what alternatives exist?
The tool's purpose implies when to use it, but it does not provide explicit guidance on when to prefer it over alternatives like execute_query or list_tables. There are no exclusion criteria or conditional context beyond the basic description.
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?
No annotations are provided, so the description carries the burden. It discloses two key behaviors: the write only executes when POSTGRES_ENABLE_WRITE=true, and the transaction is left pending until commit/rollback. This adds context beyond the schema but doesn't cover error handling or what happens if the flag is false.
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 short sentences, front-loading the primary action and adding two crucial constraints (environment variable and transaction state) without extraneous information.
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?
The tool is simple with one parameter, and the description covers the main behavioral constraints. It could be more complete by clarifying that DDL/DCL/TCL statements are not supported despite the tool name, and what happens when POSTGRES_ENABLE_WRITE is false, but the essential information is present.
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 schema already provides 100% coverage for the 'sql' parameter, listing allowed statement types (INSERT/UPDATE/DELETE/MERGE/COPY). The description does not add additional parameter details, so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Purpose4/5Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes SQL write operations and includes the critical condition POSTGRES_ENABLE_WRITE=true and transaction behavior, distinguishing it from siblings like execute_query (reads) and execute_commit/rollback (transaction control). However, the broad name suggests DDL/DCL/TCL support, while the schema restricts to DML writes, creating slight ambiguity.
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 provides a clear condition for use (POSTGRES_ENABLE_WRITE=true) and implies the need for a subsequent commit/rollback, but it does not explicitly compare to alternatives or state that it is for write statements only. Sibling names are available but not referenced.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- Behavior2/5
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No hay anotaciones, por lo que la descripción debe asumir toda la carga de transparencia. Solo dice 'Confirma' sin explicar que el commit es permanente, qué sucede con los cambios DML, ni qué ocurre si la transacción no existe o ya fue cerrada. Esto deja importantes comportamientos sin revelar.
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?
Es una sola oración que va directo al propósito, sin redundancias ni información superflua. La estructura es precisa y fácil de procesar.
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?
La herramienta es simple: un solo parámetro y sin schema de salida. La descripción cubre la operación y la procedencia del transaction_id, pero omite advertencias sobre efectos permanentes o condiciones de error, lo que deja vacíos para un agente que deba invocarla de forma autónoma.
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?
El schema ya documenta transaction_id como string con minLength 1 y su descripción 'ID de transacción'. La descripción del tool añade contexto valioso: el ID proviene de execute_dml_ddl_dcl_tcl, lo que aclara el origen y uso del parámetro más allá del schema.
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?
La descripción usa el verbo específico 'Confirma' e identifica claramente el recurso: una transacción abierta por execute_dml_ddl_dcl_tcl. Esto la distingue de sibling tools como execute_rollback y precisa exactamente qué operación realiza.
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?
La descripción indica cuándo usarla: para confirmar una transacción abierta por execute_dml_ddl_dcl_tcl, lo que establece un contexto secuencial. No menciona explícitamente execute_rollback como alternativa ni criterios de exclusión, pero el contexto de uso es claro.
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 the full burden. It discloses that execution is conditional on an environment variable, which is a useful behavioral trait. However, it does not explain what happens when the flag is false (e.g., error, no-op), nor does it warn about the potentially destructive nature of the allowed SQL statements beyond the schema listing. This partial transparency warrants a 3.
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 immediately states the tool's purpose and its key condition. There is no wasted information, and the most important aspect (the maintenance gate) is front-loaded.
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?
Given the tool's simplicity (one parameter, no output schema), the description covers the core purpose and a critical precondition. However, it omits return behavior and error handling, and the absence of an output schema means these details would be useful for the agent to know. Thus, while adequate in some respects, it lacks full completeness.
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 schema has 100% coverage for the single 'sql' parameter with a description listing the allowed statement types. The tool description adds no additional parameter information, so the baseline of 3 applies—the schema already documents the parameter adequately.
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 states 'Ejecuta mantenimiento SQL' which clearly identifies the action (execute SQL maintenance) and the resource (SQL statements of a maintenance nature). The condition 'solo si POSTGRES_ENABLE_MAINTENANCE=true' adds a specific execution gate, and the schema further clarifies by listing DROP/TRUNCATE/ALTER/CREATE/VACUUM/ANALYZE/REINDEX/GRANT/REVOKE, distinguishing this from sibling query or general DML/DDL tools.
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 a clear context for usage: the tool should only be used when POSTGRES_ENABLE_MAINTENANCE=true. This implies a when-not condition as well (if the flag is not true, do not use). However, it does not explicitly mention alternatives among sibling tools like execute_dml_ddl_dcl_tcl, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
- 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. It states the primary action (reverting) but does not disclose key behaviors such as whether the transaction must be open, what happens to locks or resources, or whether the operation is irreversible. For a destructive action, this is a notable gap.
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 leads with the action verb and the resource. No wasted words, and it is directly to the point.
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?
Given the tool's simplicity (one parameter, no output schema), the description is minimally viable but lacks important contextual details such as preconditions (transaction must be open), side effects (all changes are lost), and error behavior if the transaction does not exist. It does reference the opening tool, which adds some context, but not enough to be considered complete.
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 input schema already provides 100% coverage for the single parameter. The description adds cross-reference context by implying that transaction_id comes from execute_dml_ddl_dcl_tcl, which helps the agent understand the relationship beyond the schema's generic 'ID de transacción'.
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 'Revierte' (reverts) and clearly identifies the resource (a transaction opened by execute_dml_ddl_dcl_tcl). This distinguishes it from siblings like execute_commit and execute_query, making the purpose 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 clearly implies when to use the tool: when you need to revert a transaction created by execute_dml_ddl_dcl_tcl. It does not explicitly state alternatives or exclusions (e.g., 'use execute_commit to keep changes'), but the context is clear enough for an agent to make a basic decision.
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?
No annotations are provided, so the description carries the full burden. It discloses that the query is executed inside a READ ONLY transaction for security, which clarifies that the tool cannot modify data. This is a key safety trait beyond what the schema shows. However, it doesn't mention return format, error handling, or limits, leaving some behavioral aspects undisclosed.
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 concise, front-loaded sentences that state the purpose and then a critical safety detail. There is no fluff or redundant information, making it an efficient and well-structured description.
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?
The tool is simple with one well-documented parameter, and the description covers purpose and safety effectively. However, there is no output schema, and the description does not mention the return format or contents of the result, which is a notable gap for a query execution tool. The READ ONLY transaction context helps, but the lack of return value disclosure makes the description incomplete for an agent deciding whether to use it.
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 schema provides 100% coverage with a description for the 'sql' parameter specifying 'Consulta SELECT/WITH/EXPLAIN/SHOW'. The tool description's 'solo lectura' aligns with the schema but adds no additional parameter-level detail. Since the schema already documents the parameter thoroughly, the baseline of 3 is appropriate.
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 'Ejecuta una consulta SQL de solo lectura' (executes a read-only SQL query), using a specific verb and resource with a clear safety scope. This distinguishes it from siblings like execute_dml_ddl_dcl_tcl, which handle write/modification operations. The schema description reinforces the allowed query types (SELECT/WITH/EXPLAIN/SHOW).
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 explicitly states the tool is for read-only SQL and runs in a READ ONLY transaction, clearly indicating when it should be used. Though it doesn't explicitly name alternative tools for write operations, the read-only constraint is unambiguous and pairs well with sibling names. No explicit exclusions are given, but the context is strong.
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 behavioral burden. It adds the key detail that only visible, non-internal schemas are listed, which clarifies a filtering behavior beyond the bare tool name. However, it does not disclose return format or error conditions.
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 directly states the tool's function. No unnecessary words or repetition.
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 (no parameters, no annotations, no output schema), the description provides sufficient information for an agent to understand its purpose and scope. It lacks only an explicit note about the return structure, but that is not essential for this operation.
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, so the schema is trivially complete. The description adds no parameter information because none is needed, consistent with the baseline of 4 for no-parameter tools.
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 'Lista' and identifies the resource as 'esquemas visibles no internos', clearly distinguishing it from sibling tools like list_tables and describe_table, which operate on tables.
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 does not explicitly state when to use this tool versus alternatives, but the scope is clear from the name and description. There is no exclusion or alternative guidance, so usage is only implied.
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/bysonte/postgres-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server