Skip to main content
Glama

list_indexes

Retrieve all available Splunk indexes to identify data sources for searching and analysis in Splunk Enterprise/Cloud environments.

Instructions

Get a list of all available Splunk indexes.

Returns:
    Dictionary containing list of indexes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_indexes' MCP tool. It connects to Splunk using get_splunk_connection(), retrieves all indexes, and returns them in a dictionary. Registered via the @mcp.tool() decorator.
    @mcp.tool()
    async def list_indexes() -> Dict[str, List[str]]:
        """
        Get a list of all available Splunk indexes.
        
        Returns:
            Dictionary containing list of indexes
        """
        try:
            service = get_splunk_connection()
            indexes = [index.name for index in service.indexes]
            logger.info(f"📊 Found {len(indexes)} indexes")
            return {"indexes": indexes}
        except Exception as e:
            logger.error(f"❌ Failed to list indexes: {str(e)}")
            raise
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. It states the tool returns a dictionary with a list of indexes, which is basic behavioral information. However, it lacks details on permissions, rate limits, or whether the list is paginated or filtered, which are important for a read operation in a system like Splunk.

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?

The description is concise with two sentences that directly state the purpose and return value. It's front-loaded with the main action, though it could be slightly more structured by explicitly separating usage notes from return details.

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 simplicity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic purpose and return format, but for a tool in a complex system like Splunk, it could benefit from more context on limitations or typical use cases.

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 tool has 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description doesn't add parameter details, but this is acceptable given the lack of parameters, aligning with the baseline for 0 parameters.

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 'Get a list of all available Splunk indexes,' which is a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_indexes_and_sourcetypes' or 'get_index_info,' which might offer overlapping or related functionality.

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 sibling tools or contexts where this tool is preferred, such as for a simple list versus more detailed index information available in other tools.

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/livehybrid/splunk-mcp'

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