Skip to main content
Glama

list_saved_searches

Retrieve all saved searches from Splunk to view their names, descriptions, and search queries for monitoring and analysis.

Instructions

List all saved searches in Splunk Returns: List of saved searches with their names, descriptions, and search queries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'list_saved_searches' tool. It is registered via the @mcp.tool() decorator and implements the core logic: connects to Splunk service, iterates through all saved searches, extracts name, description, and search query for each, handles errors per item, and returns a list of dictionaries.
    @mcp.tool() async def list_saved_searches() -> List[Dict[str, Any]]: """ List all saved searches in Splunk Returns: List of saved searches with their names, descriptions, and search queries """ try: service = get_splunk_connection() saved_searches = [] for saved_search in service.saved_searches: try: saved_searches.append({ "name": saved_search.name, "description": saved_search.description or "", "search": saved_search.search }) except Exception as e: logger.warning(f"⚠️ Error processing saved search: {str(e)}") continue return saved_searches except Exception as e: logger.error(f"❌ Failed to list saved searches: {str(e)}") raise

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