Skip to main content
Glama

analyze_workload_indexes

Analyze database workload from pg_stat_statements to recommend optimal indexes, improving query performance.

Instructions

Recommend indexes based on pg_stat_statements workload

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNoDatabase id from list_databases
max_index_size_mbNo
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral transparency. The verb 'Recommend' implies a non-mutating analysis, but the description does not disclose whether the tool runs expensive queries, requires specific permissions, or has any side effects. It also does not specify the output format.

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, front-loaded sentence with no filler. Every word earns its place: it names the action, the object, and the data source.

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 there is no output schema and no annotations, the description is too sparse. It does not explain what the recommendations look like, how max_index_size_mb influences results, or when to choose this tool over analyze_query_indexes. The tool's simplicity does not excuse the lack of essential context for correct invocation.

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?

Schema coverage is only 50%: 'db' has a description, but 'max_index_size_mb' is undocumented. The tool description adds no explanation for either parameter, leaving the agent to guess the meaning of the default -1 and how the parameter affects recommendations. With low schema coverage, the description should compensate but does not.

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: recommend indexes based on pg_stat_statements workload. The verb 'Recommend' combined with the resource 'indexes' and the source 'workload' is specific and distinguishes it from siblings like analyze_query_indexes (query-specific) and analyze_db_health (database health).

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 implied by the description: use this for workload-level index recommendations rather than single-query analysis. However, it does not explicitly state when to use it over alternatives, mention prerequisites like pg_stat_statements being enabled, or provide any exclusions.

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/Leon-Achteresch/postgres-mcp'

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