Skip to main content
Glama
lordbasilaiassistant-sudo

mcp-postgres-query

Server Quality Checklist

67%
Profile completionA complete profile improves this server's visibility in search results.
  • Latest release: v1.0.0

  • Disambiguation5/5

    Each tool has a distinctly different purpose: query executes SQL, list_tables lists tables, describe_table shows columns, list_indexes shows indexes, explain_query shows execution plans, get_table_stats shows table statistics, and get_db_info shows database overview. There is no functional overlap.

    Naming Consistency4/5

    Most tools follow a clear verb_object pattern (list_tables, describe_table, get_table_stats) with consistent lowercase snake_case. The sole deviation is 'query', which is a single verb without an explicit object, but it is still understandable and fits the server's purpose.

    Tool Count5/5

    With 7 tools, the server is well-scoped for its purpose. It covers querying, schema inspection, and database metadata without being bloated or sparse. This is an ideal size for a PostgreSQL query-focused MCP server.

    Completeness4/5

    The tool set covers core database operations: executing queries, exploring tables and columns, inspecting indexes, and retrieving performance statistics. Minor gaps exist, such as missing explicit list_schemas or list_functions tools, but these are easily worked around using the query tool, and the overall surface is sufficient for most tasks.

  • Average 4/5 across 7 of 7 tools scored. Lowest: 3.3/5.

    See the Tool Scores section below for per-tool breakdowns.

    • No community issues in the last 6 months
    • 0 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 MIT 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.json to 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, the description carries full burden but fails to disclose that arbitrary SQL may modify data, and does not mention side effects, transaction behavior, or error handling. It only notes parameterized safety and returns, which does not cover the potentially destructive nature of executing arbitrary SQL.

    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 three short sentences, front-loaded with the action verb, and each sentence adds a distinct point: purpose, safety feature, and return value. It contains no fluff or redundancy, making it highly concise and well-structured.

    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?

    No output schema or annotations exist, so the description's mention of 'rows and row count' is helpful but incomplete—it omits return format, error behavior, and mutation warnings. However, the tool is simple (2 params, 1 required) and the core purpose is adequately stated, making it minimally viable.

    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?

    The schema description coverage is 100%, as both 'sql' and 'params' have descriptions. The description's mention of 'parameterized queries for safety' adds no new semantic detail beyond the schema's existing explanation of the params array, so it does not elevate the score above the baseline.

    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 uses a specific verb ('Execute') and resource ('SQL query against the PostgreSQL database'), clearly distinguishing it from sibling metadata tools like list_tables and describe_table. It also notes parameterized queries and return of rows/row count, reinforcing its role as the primary query executor.

    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 such as explain_query or list_tables. No exclusions, prerequisites, or situational recommendations are mentioned, leaving the agent to infer usage from the tool name and sibling list.

    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 must disclose behavior. It lists the returned fields, which is helpful, but it does not mention whether the operation is read-only, whether it requires table existence, or any error behavior. It doesn't contradict any annotations (none exist), but it leaves some behavioral aspects unspecified.

    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 sentence that front-loads the action and enumerates exactly what information is returned. Every word is useful, with no filler or repetition.

    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?

    Given the lack of an output schema, the description attempts to list the output fields, which aids the agent. However, it does not specify the exact result format (e.g., list of rows, order) or handle error cases, and it relies on the agent inferring the read-only nature. It is adequate for a simple metadata tool but leaves minor gaps.

    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?

    The schema already describes table_name as 'Name of the table to describe' (100% coverage), and the tool description does not add extra parameter meaning like format or qualification requirements. The description's mention of 'a table' is redundant with the schema.

    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 retrieves detailed column information for a table, enumerating specific attributes. This distinguishes it from siblings like list_tables (table names) and list_indexes (index details), 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 Guidelines3/5

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

    The description implies the tool is appropriate when column-level metadata is needed, but it does not explicitly contrast with alternatives or state when not to use it. For example, it doesn't mention that list_tables is for table names, so usage guidance is implicit rather than explicit.

    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, the description carries the burden. It discloses a key behavioral trait: the query runs inside a transaction that always rolls back, ensuring no data modification. This adds safety context beyond simply 'explain'. However, it does not mention that EXPLAIN ANALYZE actually executes the query, which could have performance implications, nor any permission requirements.

    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 two sentences with no filler. It front-loads the purpose and then adds a behavioral safety note. Every sentence earns its place.

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

    Completeness4/5

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

    Given a simple one-parameter tool with no annotations or output schema, the description covers the essential purpose and the critical safety guarantee. However, it does not describe the format of the returned execution plan or note that the query is actually executed (which might matter for planning). Still, it is adequate for an agent to select and invoke the tool correctly.

    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?

    The input schema already describes the sole parameter (sql) as 'SQL query to explain' with 100% coverage. The description reinforces the purpose but adds no new parameter-specific details such as syntax constraints or how the query string is processed. Therefore, it hovers at the baseline.

    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 retrieves the EXPLAIN ANALYZE execution plan for a SQL query, which distinguishes it from sibling tools like query (executing queries) and list_tables/describe_table (schema introspection). The verb 'Get' and specific resource 'EXPLAIN ANALYZE execution plan' make the purpose explicit.

    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 implies usage for analyzing execution plans but does not explicitly state when to prefer this over sibling tools like query, nor does it mention alternatives or exclusions. The rollback note provides context that it is safe for read-only analysis, but there is no direct guidance on when to use it versus other tools.

    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, the description must carry the transparency burden. It clearly conveys a read-only listing operation and discloses the key output fields (index name, uniqueness, definition). There are no hidden side effects or mutations indicated.

    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, concise sentence that front-loads the action and includes essential output details. Every word contributes value with no redundancy.

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

    Completeness4/5

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

    For a simple single-parameter listing tool with no output schema, the description adequately specifies the returned information (index name, unique flag, definition). It does not cover edge cases like nonexistent tables, but this is not critical for such a straightforward operation.

    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% (table_name is described as 'Name of the table'). The description only restates that it operates on a table, adding no additional semantic detail beyond the schema.

    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 uses a specific verb ('List') and resource ('indexes on a given table'), and states exactly what is included (index name, uniqueness, definition). This clearly distinguishes it from sibling tools like list_tables or 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 Guidelines3/5

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

    The description implies when to use the tool (when you need index information for a specific table) but does not explicitly mention alternatives or when not to use it. No exclusions or comparisons to siblings are provided.

    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 row count is 'estimated (from pg_stat)', which is a key behavioral caveat. It also enumerates all returned statistics, giving the agent a clear expectation of the output. It does not mention permissions or error handling, but for a stats tool this is reasonably transparent.

    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, information-dense sentence. It front-loads the action and lists all key output items, earning every word with no repetition or filler.

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

    Completeness4/5

    Given 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 no output schema. The description adequately covers the return values and the estimated nature of the row count. It could mention behavior for missing tables, but overall it is complete for typical 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 coverage is 100% (table_name is documented as 'Name of the table'), and the description does not add additional semantic meaning beyond that. The baseline of 3 applies since the schema is sufficient.

    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: getting statistics for a table, listing specific stats (row count, tuples, vacuum/analyze times, disk size). It uses a specific verb ('Get') and resource ('statistics for a table'), which distinguishes it from sibling tools like list_tables or 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 context is clear: use when you need table statistics such as row counts, vacuum times, or disk size. It does not explicitly name alternatives or exclusions, but the scope is obvious given the sibling tools, so it meets the 'clear context, no exclusions' criterion.

    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 behavior disclosure. It lists the output fields but does not explicitly state that the operation is read-only, mention prerequisites like an active connection, or describe potential errors. For a simple getter, this is moderate 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 sentence that front-loads the action and resource, then concisely lists the returned information. There is no redundancy or filler, making it highly efficient.

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

    Completeness5/5

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

    This is a low-complexity tool with no parameters, no output schema, and no annotations. The description fully specifies the output and the database system (PostgreSQL), which is sufficient for an agent to select and invoke the tool correctly.

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

    Parameters4/5

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

    The input schema has zero parameters, so the description does not need to explain any parameter details. According to the baseline for zero-parameter tools, a score of 4 is appropriate.

    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 a specific verb ('Get') and resource ('overview of the connected database'). It enumerates the exact data returned (version, name, size, table count, connection info), distinguishing it from siblings like list_tables or 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 provides clear context for when to use the tool: when a database-level overview is needed. It does not explicitly name alternatives, but the specificity of the returned fields makes the appropriate usage evident. No exclusions are mentioned, 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.

  • Behavior4/5

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

    With no annotations, the description carries the burden of disclosure. It specifies the return content (table names, types, schema) and the scope limitation to the public schema. This is adequate for a simple read-only listing tool, though it does not explicitly mention that it is non-destructive (which is implied).

    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 sentence that is front-loaded with the action and scope, and it includes the key return fields. No redundant words.

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

    Completeness5/5

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

    Given the tool's low complexity (no parameters, no nested objects) and lack of an output schema, the description adequately explains what will be returned and the scope. It is complete for its intended use.

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

    Parameters4/5

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

    The tool has zero parameters, so the description is not required to explain parameter behavior. The schema description coverage is 100% (no properties), and the description adds context about the output rather than input, which is acceptable. Baseline 4 applies.

    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 function: 'List all tables in the public schema of the connected database.' This is a specific verb+resource+scope, and it distinguishes from sibling tools like describe_table (which targets a specific table) and list_indexes (which lists indexes).

    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 implies usage (when you need an overview of tables in the public schema) but provides no explicit guidance on when to use this over alternatives or any exclusions. The context is clear but not elaborated.

    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

mcp-postgres-query MCP server

Copy to your README.md:

Score Badge

mcp-postgres-query MCP server

Copy to your README.md:

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/lordbasilaiassistant-sudo/mcp-postgres-query'

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