Skip to main content
Glama
Eszetael

postgres-mcp-hardened

Index findings

analyze_indexes
Read-onlyIdempotent

Identify unused and duplicate indexes, plus sequential scans that would benefit from an index, to optimize PostgreSQL performance.

Instructions

Indexes nobody uses, genuine duplicates, and tables scanned sequentially often enough that an index would likely pay off. Counters come from pg_stat_*, which reset with the server — read them after real traffic, not after a restart. Primary-key and unique indexes are excluded from the unused list on purpose: they earn their keep by enforcing a constraint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNopublic
databaseNowhich configured database to use; omit when only one is configured
Behavior4/5

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

Annotations already declare read-only and non-destructive, so the description adds extra value by disclosing that the data source resets with the server and that exclusion rules apply. This behavior is not visible in annotations and is important for interpretation.

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 sentences, each earning its place: findings, the reset caveat, and the exclusion rationale. It is front-loaded with the most important output information and has no 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 description covers the key findings, data freshness caveat, and exclusions, which is fairly complete for a read-only analysis tool. It lacks a description of the return format and does not explain the 'schema' parameter, but overall it gives sufficient context for correct use.

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 description does not mention either parameter. Schema coverage is only 50%, with 'database' described and 'schema' having only a default and no description, leaving the semantics of the 'schema' parameter unclear. The tool description should compensate for this gap but does not.

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 clearly enumerates the tool's outputs (unused indexes, duplicates, profitable sequential scans), which identifies it as an index analysis tool. It does not explicitly use a verb like 'analyze' or 'list', and it doesn't directly contrast with sibling tools, but the scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description provides important timing guidance: counters come from pg_stat_* and reset with server restart, so they should be read after real traffic. It also explains why primary-key and unique indexes are excluded, which helps the agent know when to trust results. It doesn't mention alternatives explicitly, but the context is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Eszetael/postgres-mcp-hardened'

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