Skip to main content
Glama

list_indexes

Retrieve all indexes for a PostgreSQL table to analyze structure, optimize queries, and manage database performance.

Instructions

List all indexes for a table.

Args:
    table_name: Name of the table
    schema: Schema name (default: public)
    
Returns:
    List of indexes with name, columns, type, and size

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
schemaNopublic
Behavior2/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 of behavioral disclosure. It states this is a list operation, implying read-only behavior, but doesn't specify if it requires database permissions, how it handles non-existent tables, or if there are rate limits. The description adds minimal behavioral context beyond the basic action, leaving gaps for a tool with no annotation coverage.

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 appropriately sized and well-structured. It starts with a clear purpose statement, followed by organized sections for 'Args' and 'Returns', making it easy to scan. Every sentence adds value without redundancy, and the information is front-loaded for quick understanding.

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 tool's moderate complexity (2 parameters, no annotations, no output schema), the description is adequate but has gaps. It explains parameters and return values, but lacks behavioral details like error handling or performance implications. Without annotations or output schema, it should do more to cover usage context, but it meets a minimum viable level for a read-only list tool.

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 description adds significant value beyond the input schema, which has 0% schema description coverage. It explains that 'table_name' is the 'Name of the table' and 'schema' is the 'Schema name (default: public)', clarifying parameter meanings that aren't in the schema. However, it doesn't detail constraints like valid schema names or table naming conventions, slightly limiting its completeness.

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 states the tool's purpose with a specific verb ('List') and resource ('indexes for a table'), making it easy to understand what it does. It distinguishes from siblings like 'list_tables' or 'list_constraints' by focusing specifically on indexes. However, it doesn't explicitly differentiate from all siblings (e.g., 'describe_table' might also provide index information), keeping it from a perfect score.

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. It doesn't mention when to choose 'list_indexes' over 'describe_table' (which might include index details) or 'list_constraints' (which might overlap with unique indexes). There's no context about prerequisites, such as needing table existence or specific permissions.

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/JaviMaligno/postgres_mcp'

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