Skip to main content
Glama

list_indices

Retrieve all indices available in your Elasticsearch cluster to understand your data structure and identify which indices to query or manage.

Instructions

List all indices in the Elasticsearch cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that lists all non-system indices in the Elasticsearch cluster by fetching aliases and filtering out dot-prefixed names.
    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 []
  • Registers the list_indices tool using the FastMCP @mcp.tool() decorator, which uses the function name as the tool name.
    @mcp.tool()

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