Skip to main content
Glama

get_index_info

Retrieve detailed metadata for a specific Splunk index by providing the index name. Ideal for managing and analyzing Splunk data resources effectively.

Instructions

Get metadata for a specific Splunk index. Args: index_name: Name of the index to get metadata for Returns: Dictionary containing index metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
index_nameYes

Implementation Reference

  • The handler function for the 'get_index_info' MCP tool, decorated with @mcp.tool() for automatic registration and schema inference from type hints and docstring. It connects to Splunk, retrieves the specified index, and returns key metadata such as event count, sizes, and time range.
    @mcp.tool() async def get_index_info(index_name: str) -> Dict[str, Any]: """ Get metadata for a specific Splunk index. Args: index_name: Name of the index to get metadata for Returns: Dictionary containing index metadata """ try: service = get_splunk_connection() index = service.indexes[index_name] return { "name": index_name, "total_event_count": str(index["totalEventCount"]), "current_size": str(index["currentDBSizeMB"]), "max_size": str(index["maxTotalDataSizeMB"]), "min_time": str(index["minTime"]), "max_time": str(index["maxTime"]) } except KeyError: logger.error(f"❌ Index not found: {index_name}") raise ValueError(f"Index not found: {index_name}") except Exception as e: logger.error(f"❌ Failed to get index info: {str(e)}") raise

Other Tools

Related 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