Skip to main content
Glama

list_indices

Retrieve all indices from an Elasticsearch cluster to view available data collections for querying and management.

Instructions

List all indices in the Elasticsearch cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_indices' tool. It lists all non-hidden indices in the Elasticsearch cluster by fetching aliases and filtering out those starting with '.'.
    @mcp.tool() def list_indices() -> list: """List all indices in the Elasticsearch cluster.""" try: indices = es.indices.get_alias() filtered = [name for name in indices.keys() if not name.startswith('.')] return filtered except Exception as e: logger.error(f"Error listing indices: {e}") return []

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/Akhilvis/elastic-mcp'

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