Skip to main content
Glama

List Indexes

list_indexes
Read-onlyIdempotent

Lists indexes, uniqueness, and column order for a specified table or every table in a schema to inspect database indexing structure.

Instructions

List indexes, uniqueness and column order for a table or the whole schema.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_indexes"
  }
}

Input Schema

NameRequiredDescriptionDefault
jdbc_urlNoOptional JDBC URL to target a specific database (credentials embedded in URL); uses environment default when omitted
table_nameNoOptional plain table name; omit to list indexes for every table

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.1
    • addedInput schema / properties / jdbc_url
      Added value: +{
      +  "description": "Optional JDBC URL to target a specific database (credentials embedded in URL); uses environment default when omitted",
      +  "type": "string"
      +}
  2. First observedv1.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety is covered. The description adds value by disclosing the shape of the result — uniqueness and column order are returned per index — which matters because there is no output schema. It stops short of saying whether index type, size, or non-B-tree indexes are included.

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 dense sentence with the resource first and the scope qualifier last; every clause (indexes, uniqueness, column order, table-or-schema) carries information an agent needs. No filler, no restatement of the title.

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?

For a two-optional-parameter read tool with full schema coverage and strong annotations, the description covers purpose, scope, and return contents adequately without an output schema. Minor gaps remain around multi-database targeting behavior when jdbc_url is supplied and whether large schemas are truncated.

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 100% and both parameters are documented in the schema, including the credentials-in-URL caveat and the omit-to-list-all behavior. The description restates the table-vs-schema choice but adds no syntax, format, or defaulting detail beyond what the schema provides, so the baseline 3 applies.

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 and resource ('List indexes') and goes further to name the returned attributes (uniqueness, column order) and the scope (a table or the whole schema). An agent can distinguish it from list_tables or list_foreign_keys on the resource noun alone, though no sibling is named explicitly.

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?

'for a table or the whole schema' implies the two usage modes, matching the optional table_name parameter, but there is no explicit when-to-use guidance, no mention of alternates like describe_table, and no stated preconditions (e.g., that a connection must be configured).

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