Skip to main content
Glama

list_indexes

Read-only

Lists Couchbase indexes with optional bucket, scope, collection, and index-name filters, returning definitions, status, and vector details for inspection.

Instructions

List indexes in the cluster with optional filtering by bucket, scope, collection, and index name.

Filters must be provided hierarchically: scope requires bucket, collection requires both, index requires all three. Set return_raw_index_stats=True to get the unprocessed source row for each index.

Each result contains: name, definition (CREATE INDEX statement), status, isPrimary, bucket, scope, collection, lastScanTime, is_vector (True for a Hyperscale or Composite Vector Index), and, only when is_vector is True, vector_type ("hyperscale" or "composite"). If a required field is missing, the entry contains warning and raw_index_stats instead.

Source depends on cluster version: v8+ queries system:indexes via the query service (RBAC-scoped — the connected user sees only indexes on keyspaces they can access); older clusters fall back to the admin-level Index Service REST API /getIndexStatus.

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
index_nameNo
scope_nameNo
bucket_nameNo
collection_nameNo
return_raw_index_statsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / bucket_name / title
      Removed value: -"Bucket Name"
    • removedInput schema / properties / collection_name / title
      Removed value: -"Collection Name"
    • removedInput schema / properties / include_raw_index_stats
      Removed value: -{
      -  "default": false,
      -  "title": "Include Raw Index Stats",
      -  "type": "boolean"
      -}
    • removedInput schema / properties / index_name / title
      Removed value: -"Index Name"
    • addedInput schema / properties / return_raw_index_stats
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • removedInput schema / properties / scope_name / title
      Removed value: -"Scope Name"
    • removedInput schema / title
      Removed value: -"list_indexesArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"list_indexesOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  2. Addedv1.0.0

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses that results are RBAC-scoped via system:indexes on v8+ while older clusters fall back to an admin-level REST endpoint — a meaningful visibility difference the agent cannot learn from annotations. It also explains degradation behavior when fields are missing (warning + raw_index_stats) and what return_raw_index_stats actually yields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the filter hierarchy are front-loaded, and the version-dependent source note is placed last where it belongs. The enumeration of result fields (name, definition, status, isPrimary, etc.) is largely redundant given that an output schema exists and could be trimmed.

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 five-parameter listing tool it covers the important edges: RBAC scoping, cluster-version-dependent data source, and fallback result shape. The only real gap relative to the sibling set is the absence of a pointer telling the agent when to prefer this over search-index or index-stats tools.

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?

Schema description coverage is 0%, so the description carries the burden, and it does well: it names return_raw_index_stats explicitly and states the hierarchical dependency binding bucket_name, scope_name, collection_name, and index_name. It could go further by naming each parameter literally or noting that all are optional and unfiltered calls list everything.

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?

'List indexes in the cluster' is a specific verb+resource, and the mentioned filters (bucket, scope, collection, index name) pin down scope precisely. It does not, however, distinguish itself from close siblings such as list_search_indexes or get_index_stats, leaving the agent to infer that this covers query/index-service indexes rather than search indexes.

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 gives a concrete operational rule: filters must be supplied hierarchically, with scope requiring bucket, collection requiring both, and index requiring all three. What is missing is any statement of when to choose this tool over list_search_indexes or get_index_stats, so alternative selection is left to inference.

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