Skip to main content
Glama
pgtriage

pgtriage

Official
by pgtriage

pgtriage

CI PyPI Python License

pgtriage: PostgreSQL performance auditing over MCP

Read-only MCP server for PostgreSQL performance auditing. Connect it to Claude Code (or any MCP client) and say "audit my database" to get structured findings with evidence and suggested fixes.

Not related to the pgAudit logging extension. pgtriage does performance triage, not compliance logging.

Why I built this

Built after diagnosing implicit type casts and missing indexes on multi-million-row tables in production fintech systems. The fixes were simple (one CREATE INDEX CONCURRENTLY statement each), but finding them required reading query plans most engineers never look at. A real production audit surfaced 88 findings across 118 tables. pgtriage automates that diagnostic process and lets any AI client explain the results.

Related MCP server: postgres-mcp-server

How it works

MCP clients call pgtriage, which collects read-only PostgreSQL evidence and returns structured findings

pgtriage connects to your PostgreSQL database and exposes performance auditing tools via the Model Context Protocol. It collects metrics from PostgreSQL system views, runs deterministic pattern detection, and returns structured findings. The MCP client provides the AI layer, interpreting results and explaining fixes in plain English.

No API keys required. No AI costs. No vendor lock-in. The intelligence comes from your MCP client.

Example output

Example audit: 283 tables scanned, 147 findings — 1 critical connection-pressure finding, 19 medium duplicate-index findings, 64 low unused-index findings, and 63 more across seven categories.

{
  "severity": "critical",
  "category": "connection_pressure",
  "detail": "Ordinary client connection utilization at 99% (96/97 usable slots; 100 max, 3 reserved). Ordinary connection capacity is effectively exhausted.",
  "suggested_fix": "Consider using a connection pooler (PgBouncer) or increasing max_connections if RAM allows.",
  "evidence": {
    "total_connections": 96,
    "max_connections": 100,
    "reserved_connections": 3,
    "ordinary_connection_capacity": 97,
    "ordinary_slots_available": 1,
    "utilization_pct": 99.0
  }
}
{
  "severity": "medium",
  "category": "duplicate_index",
  "table": "orders",
  "detail": "Structurally equivalent indexes on 'public.orders': 'public.idx_orders_customer' (2 GB, 18,420 scans), 'public.idx_orders_customer_copy' (2.1 GB, 12 scans). 'public.idx_orders_customer' has the uniquely highest recorded scan count; the remaining eligible indexes are drop candidates subject to workload review.",
  "suggested_fix": "Review every compared definition, current and periodic workload, and replica usage before considering:\nDROP INDEX CONCURRENTLY \"public\".\"idx_orders_customer_copy\";\nDROP INDEX CONCURRENTLY cannot run inside a transaction block.",
  "safe_to_apply": false,
  "evidence": {
    "structurally_equivalent": true,
    "statistics_reset_at": "2026-10-01T00:00:00+00:00",
    "minimum_statistics_age_days": 7,
    "keep_index": {
      "qualified_name": "public.idx_orders_customer",
      "scans": 18420,
      "size": "2 GB",
      "definition": "CREATE INDEX idx_orders_customer ON public.orders USING btree (customer_id)"
    },
    "drop_candidates": [
      {
        "qualified_name": "public.idx_orders_customer_copy",
        "scans": 12,
        "size": "2.1 GB",
        "definition": "CREATE INDEX idx_orders_customer_copy ON public.orders USING btree (customer_id)",
        "sql": "DROP INDEX CONCURRENTLY \"public\".\"idx_orders_customer_copy\";"
      }
    ]
  }
}

What it finds

  • Sequential scans on large tables with missing index suggestions

  • Type casts on indexed columns that suppress index usage, verified against PostgreSQL catalog metadata and the observed query plan

  • Dead tuple buildup and autovacuum health issues

  • Unused and duplicate indexes wasting disk and slowing writes

  • N+1 query patterns from pg_stat_statements analysis

  • Stale table statistics causing bad query plans

  • TOAST table bloat from large JSONB/TEXT columns

  • Configuration issues (shared_buffers, work_mem, autovacuum tuning)

  • Connection pressure approaching max_connections

  • Long-running queries holding locks

See the public roadmap for current priorities and non-goals.

Quick start

Install

pip install pgtriage

Configure Claude Code

Add to your MCP settings (.claude/settings.json or project settings):

{
  "mcpServers": {
    "pgtriage": {
      "command": "python",
      "args": ["-m", "pgtriage"],
      "env": {
        "PGTRIAGE_CONNECTION_STRING": "postgres://user:pass@localhost:5432/dbname"
      }
    }
  }
}

Recommended: Use a dedicated read-only database role:

CREATE ROLE pgtriage_reader LOGIN PASSWORD 'secure_password';
GRANT pg_read_all_stats TO pgtriage_reader;
GRANT USAGE ON SCHEMA public TO pgtriage_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO pgtriage_reader;

Use

> audit my database

> check table health for the users table

> are there any unused indexes?

> review my PostgreSQL configuration

> find slow queries

> audit only the accounts schema

Demo

pgtriage auditing PostgreSQL through an MCP client

Tools

full_audit

Run a comprehensive performance audit covering table health, slow queries, index health, and configuration. Pass the optional schema_name argument to scope table, plan, and index findings to one user schema; omit it to audit every non-system schema. Configuration findings remain database-wide. Clients that need durable recovery should generate and persist an audit_run_id UUID before dispatch. Reusing the same ID and request binding returns the saved result instead of repeating diagnostic work.

get_audit_run

Reconcile a known full_audit operation by audit_run_id without starting or repeating database work. Returns NOT_FOUND, STARTED, COMPLETED, FAILED, EXPIRED, or CONFLICT, with retained evidence for completed runs. The local registry keeps completed evidence for 24 hours and a minimal tombstone for seven additional days by default. Configure those windows with PGTRIAGE_AUDIT_RETENTION_HOURS and PGTRIAGE_AUDIT_TOMBSTONE_HOURS, or set PGTRIAGE_AUDIT_STORE_PATH to choose the registry location.

check_table_health

Analyze dead tuples, autovacuum stats, sequential scan ratios, and TOAST bloat. Optionally filter to a specific user schema and/or table.

analyze_slow_queries

Pull the slowest queries from pg_stat_statements, inspect their execution plans, and detect patterns like indexed-column type casts, sequential scans, stale statistics, and N+1 queries. An optional schema_name filter uses verbose execution-plan metadata rather than parsing SQL text. Literal queries use bounded EXPLAIN ANALYZE; normalized queries containing placeholders use a non-executing generic plan.

check_index_health

Find unused indexes, structurally equivalent duplicate-index groups, and tables that likely need indexes based on scan patterns. Duplicate findings preserve the compared definitions, sizes, and scan counts. pgtriage names a review candidate only when statistics are mature, one keeper has the uniquely highest scan count, and the candidate is not protected by a constraint or operational role. Optionally scope the analysis to one user schema.

check_config

Review PostgreSQL settings (shared_buffers, work_mem, autovacuum_vacuum_scale_factor, random_page_cost, etc.) and flag suboptimal values. Checks connection utilization and long-running queries.

Agent runtime integration

pgtriage Agent Lab is a runnable TypeScript reference client that demonstrates authorization, bounded retries, durable workflow state, operation reconciliation, and fail-closed review around this MCP boundary.

pgtriage publishes MCP safety annotations for every tool. All tools are marked read-only and non-destructive; tools that can run bounded EXPLAIN ANALYZE are deliberately not marked idempotent. Agent runtimes must still allowlist, authorize, and validate every call because MCP annotations are descriptive hints, not permissions. See Agent Runtime Integration for the complete contract, schema-scoped audit behavior, and recovery guidance. The frozen operation-identity contract is documented in Audit Run Reconciliation.

Resources

Resource

Description

pgtriage://status

Connection status, PostgreSQL version, loaded extensions

pgtriage://tables

All tables with sizes and approximate row counts

Requirements

  • Python 3.11+

  • PostgreSQL 12+

  • pg_stat_statements extension (recommended for slow query analysis, not required for other tools)

  • Database user with read access to pg_stat_* views

Safety

pgtriage is designed for read-only production use and does not issue write SQL. Three independent layers protect database state:

  1. Session-level read-only: SET default_transaction_read_only = true on every connection. PostgreSQL rejects any write attempt at the server level.

  2. Query validation: EXPLAIN ANALYZE only runs on SELECT statements. INSERT, UPDATE, DELETE, DROP, SELECT INTO, SELECT FOR UPDATE, and stacked queries are all rejected before execution.

  3. Transaction rollback: Every EXPLAIN ANALYZE runs inside an explicit BEGIN/ROLLBACK block with a 10-second statement_timeout. Transactional database changes are rolled back and long-running queries are canceled. Rollback cannot undo external side effects triggered by database extensions or functions, so the dedicated read-only role and session-level read-only enforcement remain essential.

Additionally:

  • Connection strings are never exposed in tool outputs

  • Suggested fixes are advisory and are never executed by pgtriage; findings default to safe_to_apply: false

  • All database access is single-connection, no pooling

Development

git clone https://github.com/pgtriage/pgtriage.git
cd pgtriage
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

License

MIT

Available Tools

6 tools
analyze_slow_queriesA
Read-only

Find and analyze slow queries from pg_stat_statements. Runs EXPLAIN ANALYZE on top slow SELECT queries and detects performance patterns like sequential scans and missing indexes.

NameRequiredDescriptionDefault
limitNo
min_callsNo
schema_nameNo

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior: it discloses that EXPLAIN ANALYZE is actually executed against top SELECTs (implying real DB load, not just catalog reads) and that results come from pg_stat_statements. It stops short of noting cost/overhead or that it is non-idempotent despite idempotentHint=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/5

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

Two compact sentences with zero filler, and the core action (find/analyze slow queries) plus mechanism are front-loaded. Every clause earns its place by naming the source table and the detection patterns.

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?

With no output schema, the description should clarify what the analysis returns, but it only gestures at 'performance patterns.' Combined with three fully undocumented parameters and no guidance against siblings, the definition is workable but leaves real gaps for an agent choosing and invoking it.

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?

All three parameters (limit, min_calls, schema_name) have 0% schema description coverage and are completely unexplained in the description. It is unclear whether 'limit' caps rows returned, queries analyzed, or EXPLAIN targets, and min_calls has no stated meaning, so the description fails to compensate for the coverage gap.

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?

States a specific verb pair (find/analyze) plus the exact resource and data source ('slow queries from pg_stat_statements'), and names the detection targets (sequential scans, missing indexes). It is clearly distinct from check_config and full_audit, though the 'missing indexes' overlap with the sibling check_index_health is left unresolved.

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?

Usage is only implied: an agent can infer this is for diagnosing query performance, but the description never says when to prefer it over check_index_health or full_audit, nor any prerequisites or exclusions. No explicit when/when-not guidance is present.

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

check_configA
Read-onlyIdempotent

Review PostgreSQL configuration settings and flag suboptimal values for shared_buffers, work_mem, max_connections, and autovacuum parameters.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds that it compares values against some notion of 'suboptimal,' but does not say whether it only reports or also suggests fixes, nor how thresholds are determined. Adequate but not rich.

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?

A single front-loaded sentence naming the action and the inspected settings with zero filler. Every clause earns its place and the resource is stated before the detail.

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?

With no parameters and no output schema, the description carries the burden of describing results. Saying it 'flags suboptimal values' implies a findings-oriented return, which is likely sufficient for a trivial read-only check, though the exact shape of the flag output is left implicit.

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 takes zero parameters, so there is nothing for the description to disambiguate; baseline 4 applies. The settings named in the description are internal targets of the check, not inputs.

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?

States a specific verb (review/flag) and resource (PostgreSQL configuration settings), and enumerates the concrete settings examined (shared_buffers, work_mem, max_connections, autovacuum). It does not explicitly distinguish itself from the overlapping full_audit sibling, so it stops short of a 5.

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 versus alternatives. The sibling set includes full_audit, which plausibly subsumes config review, yet the description neither mentions it nor states any trigger condition or exclusion. Usage is only inferable from the tool name and purpose.

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

check_index_healthB
Read-onlyIdempotent

Find unused indexes, duplicate indexes, and missing index opportunities based on sequential scan patterns.

NameRequiredDescriptionDefault
schema_nameNo

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds the analysis basis ('sequential scan patterns'), which is useful, but says nothing about scope (whole database vs. one schema), whether statistics collection is required, or the cost of the analysis.

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?

A single front-loaded sentence with no filler. It is efficient, though the terseness contributes to the unaddressed parameter and scope questions.

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 read-only diagnostic with annotations covering safety, this is close to adequate, but it omits the scope of the scan and the meaning of the one parameter, and there is no output schema to fall back on for expected results.

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?

The single parameter schema_name has 0% schema description coverage and the description does not mention it at all, so there is no way to know whether it filters the analysis or defaults to all schemas. The description fails to compensate for the coverage gap.

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?

Names a specific verb ('Find') and three concrete resources (unused, duplicate, missing indexes), which is far more informative than the tool name alone. What's missing is any explicit differentiation from siblings like check_table_health or full_audit, which could plausibly overlap.

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 never states when to reach for this tool versus check_table_health, analyze_slow_queries, or full_audit, nor does it give prerequisites. Usage can only be inferred from the index-related subject matter.

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

check_table_healthA
Read-onlyIdempotent

Check table health: dead tuples, bloat, vacuum stats, scan ratios. Optionally filter to a specific user schema and/or table by name.

NameRequiredDescriptionDefault
table_nameNo
schema_nameNo

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description contributes the useful detail of which health dimensions are measured, but says nothing about thresholds, severity interpretation, or cost of running across a whole 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?

Two tight sentences: the purpose and the metrics come first, and the optional filter behavior follows. Every clause carries information and nothing is repeated from the schema or annotations.

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?

With no output schema, the description does the work of naming the returned metrics, which is the key thing an agent needs. It is a read-only, zero-required-parameter tool, so little else is mandatory, though a note on how to interpret or when to prefer full_audit would close the remaining gap.

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 0%, so the schema supplies only titles and defaults. The description compensates partially by stating both parameters are optional filters and that one narrows to a user schema and the other to a table name, but it adds no format or matching details beyond that.

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 states a specific verb and resource ('Check table health') and enumerates the dimensions inspected (dead tuples, bloat, vacuum stats, scan ratios), so the agent knows exactly what this tool reports. It does not explicitly distinguish itself from siblings like check_index_health or full_audit, but the table scope is clear from the name and text.

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 second sentence explains that the schema/table arguments act as optional narrowing filters, which implies you can run it database-wide or focus on one table. However, there is no explicit when-to-use guidance versus check_index_health or full_audit, and no stated prerequisites, so usage must be inferred.

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

full_auditA
Read-only

Run a comprehensive performance audit: table health, slow queries, index health, and configuration review. Returns a unified report with all findings sorted by severity.

Optionally scope table, slow-query, and index findings to one user schema. Configuration findings remain database-wide. Omitting schema_name audits all non-system schemas.

NameRequiredDescriptionDefault
schema_nameNo
audit_run_idNo
slow_query_limitNo

TDQS

A4.2/5.0
Behavior4/5

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

Annotations cover the safety profile (readOnly, non-destructive), and the description adds real value beyond them: the return shape is a unified report sorted by severity, and there is a notable asymmetric scoping rule where configuration findings stay database-wide even when schema_name is set. It does not mention cost/runtime (a full audit is likely expensive) or what audit_run_id does behaviorally, which is the main 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/5

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

Front-loads the purpose, then the return value, then the scoping caveat — the most surprising fact (config stays database-wide) is stated before the default case. No filler sentences.

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?

With no output schema, the description correctly summarizes the return ('unified report... sorted by severity') and explains default scoping, so an agent can call it and interpret results. Remaining gap is the undocumented audit_run_id and its relationship to get_audit_run.

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 0%, so the description must carry semantics; it does a good job on schema_name (partial scoping, default = all non-system schemas), but audit_run_id is entirely unmentioned and slow_query_limit is never explained. Two of three parameters lack added meaning, so only partial compensation.

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?

States a specific verb+resource ('Run a comprehensive performance audit') and enumerates the four dimensions covered: table health, slow queries, index health, configuration. This immediately distinguishes it from the four sibling check_* tools, which each cover one dimension.

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?

By enumerating exactly the domains the siblings cover individually, it effectively signals 'use this for the combined view', and it adds scoping guidance ('omitting schema_name audits all non-system schemas'). It stops short of an explicit routing statement such as 'prefer this over calling check_table_health/analyze_slow_queries separately', which keeps it at 4.

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

get_audit_runA
Read-onlyIdempotent

Retrieve durable status and evidence for a known full-audit operation.

This tool never starts or repeats database diagnostic work.

NameRequiredDescriptionDefault
audit_run_idYes

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds real value on top: it guarantees the call will not trigger or re-trigger diagnostic work (important for retry behavior) and signals that status is 'durable', i.e. persisted. It does not say what happens with an unknown or expired audit_run_id.

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?

Two short sentences, front-loaded with the core action, and the second sentence is a targeted negative constraint rather than filler. Nothing is redundant with the name or annotations.

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?

With no output schema, the description's promise of 'status and evidence' leaves the agent guessing what fields come back or how to interpret them. For a single-parameter read tool with annotations covering safety, this is adequate but has a clear gap around return shape and unknown-ID 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 0%, so the description must carry the single audit_run_id parameter, and it only implicitly signals that the ID belongs to a prior full-audit operation. It gives no format hint (opaque string vs. UUID) or guidance on where the agent obtains the value.

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?

States a specific verb and resource ('Retrieve durable status and evidence') scoped to a known full-audit operation, and the second sentence explicitly separates it from the auditing action itself. An agent can tell this is a read-back tool distinct from full_audit without opening the schema.

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?

'for a known full-audit operation' plus 'never starts or repeats database diagnostic work' clearly establishes the use case (polling an already-started run) and the exclusion (do not call this to kick off an audit). It stops short of naming full_audit as the alternative to use for starting a run.

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.

  1. 2 tool updatesv0.3.0
    • Changedfull_audit1 field changed
      • addedInput schema / properties / audit_run_id
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Audit Run Id"
        +}
    • Addedget_audit_run
  2. 4 tool updatesv0.1.4
    • Changedanalyze_slow_queries1 field changed
      • addedInput schema / properties / schema_name
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Schema Name"
        +}
    • Changedcheck_index_health3 fields changed
      • addedInput schema / properties / schema_name / anyOf
        Added value: +[
        +  {
        +    "type": "string"
        +  },
        +  {
        +    "type": "null"
        +  }
        +]
      • changedInput schema / properties / schema_name / default
        Previous value: -"public"New value: +null
      • removedInput schema / properties / schema_name / type
        Removed value: -"string"
    • Changedcheck_table_health1 field changed
      • addedInput schema / properties / schema_name
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Schema Name"
        +}
    • Changedfull_audit1 field changed
      • addedInput schema / properties / schema_name
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "string"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Schema Name"
        +}
  3. 5 tool updatesv0.1.2
    • First observedanalyze_slow_queries
    • First observedcheck_config
    • First observedcheck_index_health
    • First observedcheck_table_health
    • First observedfull_audit

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct diagnostic area (slow queries, config, indexes, tables), and get_audit_run is clearly separate. full_audit intentionally aggregates the individual checks, which could occasionally make an agent hesitate between running a focused check vs. a full audit, but the descriptions clarify the distinction.

Naming Consistency4/5

Most tools follow a clear verb_noun pattern (analyze_slow_queries, check_config, check_index_health, check_table_health, get_audit_run). full_audit is a noun phrase rather than a verb-led name, a minor deviation within an otherwise consistent set.

Tool Count5/5

Six tools is well-scoped for a PostgreSQL performance triage server: four focused diagnostics, one aggregate audit, and one audit-status retrieval. Each tool earns its place without redundancy.

Completeness4/5

The surface covers the core triage lifecycle: investigate slow queries, config, indexes, table health, run an aggregate audit, and retrieve prior audit results. Minor gaps exist around discovering schema/table names before filtering and broader server diagnostics like replication or connection stats, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Read-only PostgreSQL analytics MCP server — query plans, slow queries, index usage, table bloat, vacuum status. No DDL/DML/writes. Curated by Archimedes Market with a verified Trust Report.
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Provides PostgreSQL database management and analysis via MCP, enabling schema exploration, query execution, performance monitoring, and database health checks.
    36
    33 npm
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Governed PostgreSQL DBA operations — slow-query, bloat, and blocking-lock RCA, index management, vacuum/analyze, and replication lag, with unbypassable audit logging (MCP + CLI), budget/runaway guards, dry-run, and undo/rollback.
    35
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only PostgreSQL ops/DBA server for the Model Context Protocol, providing diagnostics like slow queries, index health, lock waits, replication lag, and configuration tuning advice.
    MIT