Skip to main content
Glama
shubham4038

postgres-mcp-js

by shubham4038

analyze_query_indexes

Analyze up to 10 SQL queries to identify missing indexes and improve database performance.

Instructions

Analyze specific SQL queries and identify missing indexes. Maximum 10 queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYesList of SQL queries to analyze
databaseNoDatabase alias to query. Omit to use the primary database.
max_index_size_mbNo
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 discloses a limit of 10 queries, which is a behavioral trait, but it does not state whether the tool is read-only (it appears to be, but not explicitly), what happens if more than 10 queries are submitted, or any side effects. Basic behavioral info is present but minimal.

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 extremely concise: one sentence plus a standalone limit statement. It is front-loaded and contains no wasted words or repetition. Every part serves a purpose.

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

Completeness2/5

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

Given the tool has 3 parameters, no output schema, and no annotations, the description is insufficient. It does not explain the output format (e.g., list of missing indexes), prerequisites (e.g., query plan access), or how the database parameter affects analysis. The complexity demands more contextual detail.

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 input schema has 3 parameters with 67% description coverage (queries and database have descriptions, max_index_size_mb does not). The description redundantly states 'Maximum 10 queries' (already in schema) but adds no meaning for max_index_size_mb (what does it limit? Index size?). The description fails to compensate for the missing schema description for this parameter.

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: analyze specific SQL queries to identify missing indexes, with a limit of 10 queries. This distinguishes it from siblings like analyze_workload_indexes (which likely analyzes workloads) and detect_index_misses (which may not take explicit queries).

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

Usage Guidelines3/5

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

The description implies usage when you have specific SQL queries to check for missing indexes, but it does not provide explicit guidance on when to use this tool versus alternatives (e.g., analyze_workload_indexes, detect_index_misses) or any exclusions. No when-not-to-use information is given.

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/shubham4038/postgres-mcp-js'

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